Compare commits
81 Commits
Author | SHA1 | Date | |
---|---|---|---|
7ed272975d | |||
5dab342cdb | |||
fd515ffea7 | |||
02b6253fb0 | |||
b12c53de14 | |||
0303446664 | |||
562d89540b | |||
500d06d4ea | |||
3e5ec4159d | |||
f517e534e3 | |||
2abb7737fe | |||
9243d1a43e | |||
a94aead136 | |||
b52f02548b | |||
73b7858a95 | |||
46d51faf7d | |||
d720eb238c | |||
8d206ab64f | |||
f88bdc43fe | |||
e0936bd216 | |||
49f28a497d | |||
22801f53d2 | |||
6eef5a07e7 | |||
edbac20968 | |||
550cc08761 | |||
82626a44b8 | |||
ee11fd5795 | |||
3255375325 | |||
99e3b211b1 | |||
99ef0e92ae | |||
23f22158a7 | |||
0f6bcd4701 | |||
e7c86268ba | |||
6a3683b88c | |||
bffaec612c | |||
78175ff62e | |||
b6fcde0c9d | |||
45649e1ab0 | |||
c154e234ba | |||
cfccedde0b | |||
a1a6131f95 | |||
142c22361b | |||
27d80c2b74 | |||
cdc775820f | |||
b19d22b0fc | |||
8a146184ee | |||
7a29d02d74 | |||
ad71502d36 | |||
a73f9828cc | |||
bb5c50abc7 | |||
2763eb9c2e | |||
af511923c6 | |||
da0c0f0583 | |||
4bff3e78cf | |||
470004b152 | |||
472298bb2b | |||
47a564f1dd | |||
452e5bf697 | |||
5730f99080 | |||
e466b300b5 | |||
46f9698c87 | |||
d5b5db5e0b | |||
cbf137dd73 | |||
07ba60e643 | |||
8c75ba1df6 | |||
f5956740c0 | |||
33c204ab54 | |||
d25e5ffd36 | |||
b9adcabe7d | |||
c959146238 | |||
59095d22c3 | |||
2a675eaf25 | |||
2ca3477258 | |||
4a57845c36 | |||
a2bbaf019b | |||
5b87ceb9f2 | |||
db4bdccdb1 | |||
c40dc037b3 | |||
1a66a0f170 | |||
aec1b98e9a | |||
724e96994c |
2
.cz.yaml
2
.cz.yaml
@ -4,4 +4,4 @@ commitizen:
|
||||
name: cz_conventional_commits
|
||||
tag_format: $major.$minor.$patch$prerelease
|
||||
update_changelog_on_bump: true
|
||||
version: 1.0.0rc2
|
||||
version: 1.0.0rc3
|
||||
|
412
.gitlab-ci.yml
412
.gitlab-ci.yml
@ -1,7 +1,6 @@
|
||||
---
|
||||
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
MY_PROJECT_ID: "13001358"
|
||||
|
||||
|
||||
@ -12,15 +11,24 @@ include:
|
||||
- .gitlab-ci_common.yaml
|
||||
- template/automagic.gitlab-ci.yaml
|
||||
|
||||
Documentation.Lint:
|
||||
rules:
|
||||
- when: never
|
||||
|
||||
Documentation.Build:
|
||||
rules:
|
||||
- when: never
|
||||
|
||||
Website.Lint:
|
||||
extends: .Lint_Markdown
|
||||
extends: .Lint_Markdown_Docs
|
||||
variables:
|
||||
MDLINT_PATHS: "pages/*.md pages/**/*.md pages/**/**/*.md pages/**/**/**/*.md pages/**/**/**/**/**/*.md #CHANGELOG.md !gitlab-ci !website-template"
|
||||
|
||||
|
||||
Website.Build:
|
||||
extends: .MKDocs_Build
|
||||
needs: [ 'Website.Lint' ]
|
||||
resource_group: preperation
|
||||
resource_group: build
|
||||
|
||||
|
||||
Assemble.Website.Prepare:
|
||||
@ -40,7 +48,7 @@ Assemble.Website.Prepare:
|
||||
#- ls -laR $CI_PROJECT_DIR
|
||||
# remove ops placeholder index.html
|
||||
|
||||
|
||||
# Project: Operations
|
||||
- echo "[DEBUG] fetch operations docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/32419575/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
@ -56,7 +64,7 @@ Assemble.Website.Prepare:
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
|
||||
# Project: Gitlab-CI
|
||||
- echo "[DEBUG] fetch gitlab-ci project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/28543717/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
@ -72,7 +80,23 @@ Assemble.Website.Prepare:
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
# Project: ansible role, git_configuration
|
||||
- echo "[DEBUG] fetch git_configuration project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/45705596/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output git_configuration-artifacts.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/45705596/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip git_configuration-artifacts.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/git_configuration";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/git_configuration" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/git_configuration/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
# Project: Docker Mail Server
|
||||
- echo "[DEBUG] fetch docker-mail project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/33611657/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
@ -88,6 +112,158 @@ Assemble.Website.Prepare:
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
# Project: Ansible Execution Environment
|
||||
- echo "[DEBUG] fetch execution_environment project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/45741845/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output execution_environment-artifacts.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/45741845/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip execution_environment-artifacts.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/execution_environment";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/execution_environment" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/execution_environment/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
# Project: NodeRED LDAP Self Service
|
||||
- echo "[DEBUG] fetch nodered_ldap_self_service project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/48321671/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output nodered_ldap_self_service-artifacts.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/48321671/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip nodered_ldap_self_service-artifacts.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ldap_self_service";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/ldap_self_service" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ldap_self_service/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
# Project: docker GLPI
|
||||
- echo "[DEBUG] fetch docker-glpi project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/12928828/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output docker-glpi-artifacts.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/12928828/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip docker-glpi-artifacts.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/glpi";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/glpi" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/glpi/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
|
||||
# Project: kubernetes monitoring helm chart
|
||||
- echo "[DEBUG] fetch kubernetes_monitoring project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/50510268/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output kubernetes_monitoring.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/50510268/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip kubernetes_monitoring.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/kubernetes_monitoring";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/kubernetes_monitoring" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/kubernetes_monitoring/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
|
||||
# Project: Ansible Public Playbooks
|
||||
- echo "[DEBUG] fetch Ansible Public Playbooks project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/46364551/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output ansible_playbooks.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/46364551/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip ansible_playbooks.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/playbooks";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/ansible/playbooks" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/playbooks/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
|
||||
# Project: Ansible role common
|
||||
- echo "[DEBUG] fetch Ansible common project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/52226103/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output nfc_common.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/52226103/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip nfc_common.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/roles/common";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/ansible/roles/common" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/roles/common/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
|
||||
# Project: Ansible role firewall
|
||||
- echo "[DEBUG] fetch Ansible firewall project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/51640016/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output nfc_firewall.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/51640016/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip nfc_firewall.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/roles/firewall";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/ansible/roles/firewall" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/roles/firewall/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
|
||||
# Project: Ansible role homeassistant
|
||||
- echo "[DEBUG] fetch Ansible Public homeassistant project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/51020674/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output nfc_homeassistant.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/51020674/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip nfc_homeassistant.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/roles/homeassistant";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/ansible/roles/homeassistant" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/roles/homeassistant/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
|
||||
# Project: Ansible role kubernetes
|
||||
- echo "[DEBUG] fetch Ansible kubernetes project docs"
|
||||
- 'HTTP_STATUS_FILE=$(curl --location -o /dev/null --silent --head --write-out "%{http_code}" --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/51640029/jobs/artifacts/development/download?job=Documentation%2EBuild")'
|
||||
- echo "[DEBUG] HTTP_STATUS_FILE=$HTTP_STATUS_FILE"
|
||||
- |
|
||||
if [ "0$HTTP_STATUS_FILE" != "0200" ]; then
|
||||
echo "[ERROR] Unable to fetch Job Artifacts due to HTTP status of $HTTP_STATUS_FILE";
|
||||
# exit 1;
|
||||
else
|
||||
curl --location --output nfc_kubernetes.zip --header "PRIVATE-TOKEN: ${GIT_COMMIT_TOKEN}" "https://gitlab.com/api/v4/projects/51640029/jobs/artifacts/development/download?job=Documentation%2EBuild";
|
||||
unzip nfc_kubernetes.zip;
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/roles/kubernetes";
|
||||
cp -rvf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build/projects/ansible/roles/kubernetes" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/projects/ansible/roles/kubernetes/";
|
||||
rm -Rf "$CI_PROJECT_DIR/artifacts/build/Documentation.Build";
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# # below 2 lines commented out as need to ffigure out how to download artifacts.
|
||||
# - rm -Rf "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/build/operations/index.html"
|
||||
@ -117,10 +293,57 @@ Assemble.Website.Prepare:
|
||||
when: always
|
||||
paths:
|
||||
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/*"
|
||||
resource_group: preperation
|
||||
resource_group: build
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master"'
|
||||
# - if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master" && $CI_PIPELINE_SOURCE == "push"'
|
||||
# when: always
|
||||
|
||||
# Build docs on tag so they can be downloaded from the tag job and are always available.
|
||||
- if: # condition_git_tag
|
||||
$CI_COMMIT_TAG != null &&
|
||||
$CI_COMMIT_BRANCH == null
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
when: always
|
||||
|
||||
- if: # condition_master_branch_push
|
||||
$CI_COMMIT_BRANCH == "master" &&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
when: always
|
||||
|
||||
- if: # condition_dev_branch_push
|
||||
$CI_COMMIT_BRANCH == "development" &&
|
||||
(
|
||||
$CI_PIPELINE_SOURCE == "pipeline"
|
||||
||
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
||
|
||||
$CI_PIPELINE_SOURCE == "schedule"
|
||||
)
|
||||
# See nofusscomputing/projects/gitlab-ci#34 for extra $CI_PIPELINE_SOURCE
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
# No changes check # See nofusscomputing/projects/gitlab-ci#34
|
||||
# changes:
|
||||
# paths:
|
||||
# - '{docs/**,pages/**}/*.md'
|
||||
# compare_to: 'master'
|
||||
when: always
|
||||
|
||||
- if: # condition_not_master_or_dev_push
|
||||
$CI_COMMIT_BRANCH != "master" &&
|
||||
$CI_COMMIT_BRANCH != "development" &&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
changes:
|
||||
paths:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
compare_to: 'development'
|
||||
when: always
|
||||
|
||||
- when: never
|
||||
|
||||
|
||||
@ -134,13 +357,59 @@ pages:
|
||||
environment:
|
||||
name: staging
|
||||
url: $CI_PAGES_URL
|
||||
resource_group: preperation
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master"'
|
||||
when: on_success
|
||||
# - if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master" && $CI_PIPELINE_SOURCE == "push"'
|
||||
# when: on_success
|
||||
|
||||
# Build docs on tag so they can be downloaded from the tag job and are always available.
|
||||
- if: # condition_git_tag
|
||||
$CI_COMMIT_TAG != null &&
|
||||
$CI_COMMIT_BRANCH == null
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
when: always
|
||||
|
||||
- if: # condition_master_branch_push
|
||||
$CI_COMMIT_BRANCH == "master" &&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
when: always
|
||||
|
||||
- if: # condition_dev_branch_push
|
||||
$CI_COMMIT_BRANCH == "development" &&
|
||||
(
|
||||
$CI_PIPELINE_SOURCE == "pipeline"
|
||||
||
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
||
|
||||
$CI_PIPELINE_SOURCE == "schedule"
|
||||
)
|
||||
# See nofusscomputing/projects/gitlab-ci#34 for extra $CI_PIPELINE_SOURCE
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
# No changes check # See nofusscomputing/projects/gitlab-ci#34
|
||||
# changes:
|
||||
# paths:
|
||||
# - '{docs/**,pages/**}/*.md'
|
||||
# compare_to: 'master'
|
||||
when: always
|
||||
|
||||
- if: # condition_not_master_or_dev_push
|
||||
$CI_COMMIT_BRANCH != "master" &&
|
||||
$CI_COMMIT_BRANCH != "development" &&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
changes:
|
||||
paths:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
compare_to: 'development'
|
||||
when: always
|
||||
|
||||
- when: never
|
||||
|
||||
|
||||
@ -163,17 +432,63 @@ pages:
|
||||
reports:
|
||||
junit:
|
||||
- "*.junit.xml"
|
||||
resource_group: preperation
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH'
|
||||
# - if: '$CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
|
||||
# when: on_success
|
||||
|
||||
# Build docs on tag so they can be downloaded from the tag job and are always available.
|
||||
- if: # condition_git_tag
|
||||
$CI_COMMIT_TAG != null &&
|
||||
$CI_COMMIT_BRANCH == null
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
when: on_success
|
||||
|
||||
- if: # condition_master_branch_push
|
||||
$CI_COMMIT_BRANCH == "master" &&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
when: on_success
|
||||
|
||||
- if: # condition_dev_branch_push
|
||||
$CI_COMMIT_BRANCH == "development" &&
|
||||
(
|
||||
$CI_PIPELINE_SOURCE == "pipeline"
|
||||
||
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
||
|
||||
$CI_PIPELINE_SOURCE == "schedule"
|
||||
)
|
||||
# See nofusscomputing/projects/gitlab-ci#34 for extra $CI_PIPELINE_SOURCE
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
|
||||
# No changes check # See nofusscomputing/projects/gitlab-ci#34
|
||||
# changes:
|
||||
# paths:
|
||||
# - '{docs/**,pages/**}/*.md'
|
||||
# compare_to: 'master'
|
||||
when: on_success
|
||||
|
||||
- if: # condition_not_master_or_dev_push
|
||||
$CI_COMMIT_BRANCH != "master" &&
|
||||
$CI_COMMIT_BRANCH != "development" &&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
changes:
|
||||
paths:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
compare_to: 'development'
|
||||
when: on_success
|
||||
|
||||
- when: never
|
||||
|
||||
|
||||
Unit Tests:
|
||||
extends: .Pytest_template
|
||||
needs: [ 'Website.Build' ]
|
||||
resource_group: preperation
|
||||
script:
|
||||
- mv "$CI_PROJECT_DIR/artifacts/build/Website.Build/build" build
|
||||
- pytest --verbose --junitxml=unit_test.junit.xml --tb=line test/unit
|
||||
@ -190,43 +505,17 @@ Unit Tests:
|
||||
# - echo "placeholder job for integration tests" > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/DETEMEME.txt"
|
||||
|
||||
|
||||
|
||||
.Add_SSHKey: &Add_SSHKey_Before_Script |
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
eval $(ssh-agent -s)
|
||||
SSH_KEY_NAME=SSH_PRIVATE_KEY_${ANSIBLE_USER}
|
||||
echo "Debug SSH_KEY_NAME[$SSH_KEY_NAME]"
|
||||
chmod 700 "${!SSH_KEY_NAME}"
|
||||
ssh-add "${!SSH_KEY_NAME}"
|
||||
#update next line so that ca key can be obtained. original source is ansible repo
|
||||
#HOST_SSH_ID=$(cat roles/openssh-server/files/nww-nl/host_ca.pub)
|
||||
HOST_SSH_ID=$(cat ${SSH_HOST_CA})
|
||||
echo DEBUG HOST_SSH_ID[$HOST_SSH_ID]
|
||||
echo "@cert-authority *.networkedweb.com $HOST_SSH_ID" > ~/.ssh/known_hosts
|
||||
chmod 700 ~/.ssh/known_hosts
|
||||
ls -la ~/.ssh
|
||||
|
||||
|
||||
public_website:
|
||||
stage: publish
|
||||
image: debian:buster-slim
|
||||
image: alpine
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
before_script:
|
||||
- if [ "0$ANSIBLE_USER" == "0" ]; then ANSIBLE_USER=deploy; fi
|
||||
- echo Debug ANSIBLE_USER[$ANSIBLE_USER]
|
||||
- apt update
|
||||
- apt install --no-install-recommends -y ssh
|
||||
- ls -la "$CI_PROJECT_DIR/artifacts/prepare/Assemble.Website.Prepare/build"
|
||||
- mv "$CI_PROJECT_DIR/artifacts/prepare/Assemble.Website.Prepare/build" "$CI_PROJECT_DIR/public"
|
||||
- rm -Rf "$CI_PROJECT_DIR/public/build"
|
||||
- ls -la "$CI_PROJECT_DIR"
|
||||
- ls -la "$CI_PROJECT_DIR/public"
|
||||
- *Add_SSHKey_Before_Script
|
||||
- ls -la /html
|
||||
script:
|
||||
- ssh ${ANSIBLE_USER}@${HOST_PUBLIC_WEBSITE} sudo rm -Rf ${PUBLIC_WEBSITE_PATH}/*
|
||||
- scp -r public/* ${ANSIBLE_USER}@${HOST_PUBLIC_WEBSITE}:${PUBLIC_WEBSITE_PATH}
|
||||
- rm -rf /html/*
|
||||
- cp -r "$CI_PROJECT_DIR/artifacts/prepare/Assemble.Website.Prepare/build"/* /html/
|
||||
- ls -laR /html/
|
||||
needs: [ 'Assemble.Website.Prepare', 'Unit Tests']
|
||||
resource_group: production
|
||||
environment:
|
||||
@ -236,12 +525,33 @@ public_website:
|
||||
paths:
|
||||
- public
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH == "master"'
|
||||
- if: # condition_master_branch_push
|
||||
$CI_COMMIT_BRANCH == "master" &&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
when: on_success
|
||||
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH == "development" && $CI_PIPELINE_SOURCE != "merge_request_event"'
|
||||
when: manual
|
||||
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "development" && $CI_COMMIT_BRANCH != "master" && $CI_PIPELINE_SOURCE != "merge_request_event"'
|
||||
when: manual
|
||||
allow_failure: true
|
||||
- when: never
|
||||
|
||||
- if: # condition_dev_branch_push
|
||||
$CI_COMMIT_BRANCH == "development" &&
|
||||
(
|
||||
$CI_PIPELINE_SOURCE == "pipeline"
|
||||
||
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
||
|
||||
$CI_PIPELINE_SOURCE == "schedule"
|
||||
)
|
||||
# See nofusscomputing/projects/gitlab-ci#34 for extra $CI_PIPELINE_SOURCE
|
||||
exists:
|
||||
- '{docs/**,pages/**}/*.md'
|
||||
# No changes check # See nofusscomputing/projects/gitlab-ci#34
|
||||
# changes:
|
||||
# paths:
|
||||
# - '{docs/**,pages/**}/*.md'
|
||||
# compare_to: 'master'
|
||||
allow_failure: true
|
||||
when: manual
|
||||
- when: never
|
||||
tags:
|
||||
- production
|
||||
- website
|
||||
|
8
.nfc_automation.yaml
Normal file
8
.nfc_automation.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
|
||||
role_git_conf:
|
||||
gitlab:
|
||||
submodule_branch: "development"
|
||||
default_branch: development
|
||||
mr_labels: ~"type::automation" ~"impact::0" ~"priority::0"
|
||||
auto_merge: true
|
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,3 +1,13 @@
|
||||
## 1.0.0rc3 (2023-05-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **ci**: [c40dc037](https://gitlab.com/nofusscomputing/infrastructure/website/-/commit/c40dc037b3b7e0e0be97e9421c7c0097c8c494fe) - website.lint paths updated [ [!13](https://gitlab.com/nofusscomputing/infrastructure/website/-/merge_requests/13) ]
|
||||
|
||||
### Continious Integration
|
||||
|
||||
- **chore**: [aec1b98e](https://gitlab.com/nofusscomputing/infrastructure/website/-/commit/aec1b98e9a6f466d18981f84902964446ba50b88) - add nfc automation config [ [!12](https://gitlab.com/nofusscomputing/infrastructure/website/-/merge_requests/12) ]
|
||||
|
||||
## 1.0.0rc2 (2023-05-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
Submodule gitlab-ci updated: 3383d5a086...a5a9fa4437
56
mkdocs.yml
56
mkdocs.yml
@ -2,7 +2,7 @@ INHERIT: website-template/mkdocs.yml
|
||||
|
||||
repo_name: Website
|
||||
repo_url: https://gitlab.com/nofusscomputing/infrastructure/website
|
||||
edit_uri: '/-/ide/project/nofusscomputing/projects/docker-mail/edit/development/-/pages/'
|
||||
edit_uri: '/-/ide/project/nofusscomputing/projects/website/edit/development/-/pages/'
|
||||
|
||||
nav:
|
||||
- Home: index.md
|
||||
@ -11,6 +11,10 @@ nav:
|
||||
|
||||
- articles/index.md
|
||||
|
||||
- 2023:
|
||||
|
||||
- articles/2023/new_website.md
|
||||
|
||||
- 2015:
|
||||
|
||||
- articles/2015/choose_internet_service.md
|
||||
@ -25,12 +29,58 @@ nav:
|
||||
|
||||
- projects/index.md
|
||||
|
||||
- Ansible Roles: projects/ansible-roles/README.md
|
||||
- Ansible:
|
||||
|
||||
- Docker Mail: projects/docker-mail/index.md
|
||||
- projects/ansible/index.md
|
||||
|
||||
- Ansible Execution Environment:
|
||||
|
||||
- projects/execution_environment/index.md
|
||||
|
||||
- Playbooks:
|
||||
|
||||
- projects/ansible/playbooks/index.md
|
||||
|
||||
- Roles:
|
||||
|
||||
- projects/ansible/roles/index.md
|
||||
|
||||
- Common:
|
||||
|
||||
- projects/ansible/roles/common/index.md
|
||||
|
||||
- Firewall:
|
||||
|
||||
- projects/ansible/roles/firewall/index.md
|
||||
|
||||
- Home Assistant:
|
||||
|
||||
- projects/ansible/roles/homeassistant/index.md
|
||||
|
||||
- Kubernetes:
|
||||
|
||||
- projects/ansible/roles/kubernetes/index.md
|
||||
|
||||
- Git Configuration:
|
||||
|
||||
- projects/git_configuration/index.md
|
||||
|
||||
- Docker:
|
||||
|
||||
- projects/docker/index.md
|
||||
|
||||
- BIND DNS Server: projects/docker/bind/index.md
|
||||
|
||||
- Docker Mail: projects/docker-mail/index.md
|
||||
|
||||
- Gitlab CI: projects/gitlab-ci/index.md
|
||||
|
||||
- Docker GLPI: projects/glpi/index.md
|
||||
|
||||
- Kubernetes Monitoring: projects/kubernetes_monitoring/index.md
|
||||
|
||||
- LDAP Self Service: projects/ldap_self_service/index.md
|
||||
|
||||
- Python Gitlab Management: projects/python-gitlab-management/README.md
|
||||
|
||||
- Operations:
|
||||
|
29
pages/articles/2023/new_website.md
Normal file
29
pages/articles/2023/new_website.md
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
title: Site Refurbishment
|
||||
description: it's an update.
|
||||
date: 2023-08-01
|
||||
template: article.html
|
||||
type: blog
|
||||
author: jon
|
||||
copyrightHolder: jon
|
||||
about: https://nofusscomputing.com
|
||||
tags:
|
||||
- Automation
|
||||
- Website
|
||||
- Update
|
||||
---
|
||||
|
||||
It's been a while and for all intents and purposes; Prior to today you would not have been mistaken for thinking that our site was dead in the water. I could give reasons, but the reality is it's an excuse and we all know that *"they're like arseholes, everyones got one!!"* As it currently stands, I find myself with a little extra time on my hands so this site revamp is the start and first visibility of what I've been doing.
|
||||
|
||||
I've spent a good part of a few of a few decades working with computers. Whilst this has been an interesting journey, in the last few years I've discovered Configuration-as-Code. The concept itself wasn't exactly new to me, I just put off learning anything about it past the name. As creatures of habits, us humans, once we have found our way we tend to stick to that routine or better stated, with what we know.
|
||||
Moving from the early days (norton ghost and clonezilla) with manually built images for every different type of machine. which became very monotonous to manually update the images with patches. The opportunity had presented itself resently where for the first time in over two decades, I'm required to rebuild my infrastructre from scratch. As daunting as this sounds, given the leaps and bounds that have occured in the last decade, even more in the last five years. Technologies have evolved to the point where now it takes a fraction of the time to do what used to take upwards of a week. Upgrades now are not rebuild the image from scratch, clone and redeploy. Now, I punch the keyboard and characters show on the screen, then I run a program, Ansible. It reads the jibberish (json/yaml) and presto, Bobs your uncle, a deploy has occured. Fresh deployment or updates, doesn't matter, run the same code again and Ansible ensures it's setup how it's supposed to be. Need to update a piece of software, too easy, change the version number in your config files.
|
||||
|
||||
Other things of note worthy mention:
|
||||
|
||||
- For Family and friends, free of course I host Password vault, <https://vault.nofusscomputing.com>. This enables you to install an app on your phone and within your web browser which lets you sync your passwords, identities and secrets-and using zero-trust full encryption. Best feature of all,you only have to remember your vault password, as everything else is stored in the vault.
|
||||
|
||||
- Helpdesk now deployed publicly, <https://helpdesk.nofusscomputing.com>. Along with automating everything else a Service Catalog is being extended to automate other tasks.
|
||||
|
||||
- Website updating now occurs automagically. We do this via Gitlab using CD/CI pipelines. Now I just edit a file, push the changes and the changes deploy my site on the interwebs.
|
||||
|
||||
- Our [projects](../../projects/index.md) from [GitHub](https://github.com/NoFussComputing) and [GitLab](https://gitlab.com/nofusscomputing) deploy their docs to our site, again automagically.
|
BIN
pages/assets/nfc_revamp.png
Normal file
BIN
pages/assets/nfc_revamp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
BIN
pages/assets/nfc_revamp_dark.png
Normal file
BIN
pages/assets/nfc_revamp_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
@ -8,6 +8,6 @@ hide:
|
||||
- toc
|
||||
---
|
||||
|
||||

|
||||
|
||||
Home Page
|
||||
<div style="background: url(assets/nfc_revamp.png) no-repeat center top; background-size: 282px 90px; width: 100%; height: 120px; display: flex;">
|
||||
<span style="align-self: flex-end; width: 100%; text-align: center; color: #009900; font-weight: bold; font-size: 14pt;">Using Technology to make life easier</span>
|
||||
</div>
|
||||
|
156
pages/projects/ansible/index.md
Normal file
156
pages/projects/ansible/index.md
Normal file
@ -0,0 +1,156 @@
|
||||
---
|
||||
title: Ansible Projects
|
||||
description: No Fuss Computings Ansible Projects
|
||||
date: 2023-06-01
|
||||
template: project.html
|
||||
about: https://gitlab.com/nofusscomputing/projects/ansible
|
||||
---
|
||||
|
||||
This section of the website contains Ansible projects and the details of how to use said projects. Across All of our Ansible projects we standardize as much as possible.
|
||||
|
||||
Any playbooks and roles we create are designed with the below ansible setup in mind. Whilst there are many ways ~~to skin a cat~~ setup ansible, If you deviate from below you will be required to test to ensure that if using our playbooks/roles, that they work as intended. If you find that there is a better way of setting up Ansible, raise an issue with your proposal and we'll discuss.
|
||||
|
||||
- [No Fuss Computing playbooks](playbooks/index.md)
|
||||
|
||||
- [No Fuss Computing roles](roles/index.md)
|
||||
|
||||
|
||||
## Inventory Setup
|
||||
|
||||
The Inventory should be setup under an SCM, git in this case; So that a version history is maintained. This also fosters a full audit trail as part of the complete host lifecycle. Idealy the Inventory along with directories `files` and `templates.` should be contained in it's own git repository. Using this method provides that the git history only pertain to the inventory alone, and therefore any install/configuration of a host.
|
||||
|
||||
!!! tip
|
||||
If you must include `playbooks` and `roles` wihin your inventory repository it's a good idea that these still be their own repositories with them added to the inventory repository as a git sub-module.
|
||||
|
||||
Ansible inventory directory structure.
|
||||
|
||||
``` bash
|
||||
.
|
||||
├── ansible.cfg
|
||||
├── files
|
||||
│ ├── all
|
||||
│ │ ├──
|
||||
│ │ ├──
|
||||
│ ├── node1
|
||||
│ │ ├──
|
||||
│ │ ├──
|
||||
│ ├── k3s-prod
|
||||
│ │ ├── Ingress-manifest-AWX.yaml
|
||||
│ │ └── deployment-manifest-test_web_server.yaml
|
||||
│ ├── k3s-testing
|
||||
│ └── deployment-manifest-test_web_server.yaml
|
||||
|
|
||||
├── .inventory_root
|
||||
│
|
||||
├── inventory
|
||||
│ ├── development
|
||||
│ │ ├── group_vars
|
||||
│ │ │ ├── all.yaml
|
||||
│ │ │ ├── debian.yaml
|
||||
│ │ ├── hosts.yaml
|
||||
│ │ └── host_vars
|
||||
│ │ ├── laptop2.yaml
|
||||
│ │ ├── node1.yaml
|
||||
│ │ ├── node2.yaml
|
||||
│ │ ├── node3.yaml
|
||||
│ │ ├── node4.yaml
|
||||
│ │ └── node5.yaml
|
||||
│ └── production
|
||||
│ ├── group_vars
|
||||
│ │ ├── all
|
||||
│ │ │ ├── main.yaml
|
||||
│ │ │ ├── vault.yaml
|
||||
│ │ │ └── versions_software.yaml
|
||||
│ │ ├── awx.yaml
|
||||
│ ├── hosts.yaml
|
||||
│ └── host_vars
|
||||
│ ├── node1.yaml
|
||||
│ ├── k3s-prod
|
||||
│ │ ├── backup.yaml
|
||||
│ │ ├── kubernetes.yaml
|
||||
│ │ ├── main.yaml
|
||||
│ │ └── vault.yaml
|
||||
│ ├── k3s-testing
|
||||
│ ├── main.yaml
|
||||
│ └── vault.yaml
|
||||
├── playbooks
|
||||
│ ├── all.yaml
|
||||
├── README.md
|
||||
└── templates
|
||||
├── hosts
|
||||
│ └── k3s-prod
|
||||
│ └── HelmChart-manifest-NginX-ingress.yaml
|
||||
│
|
||||
└── groups
|
||||
```
|
||||
|
||||
| name | Type | Description |
|
||||
|:---|:---:|:---|
|
||||
| ansible.cfg | _file_ | Ansible configuration file applicable to this inventory |
|
||||
| files | _directory_ | Contain files that a host may require. Playbook task iterates over by hostname and group name. Sub-directories for hostname / group-name |
|
||||
| .inventory_root | _file_ | This file is used by `nfc_common` role to determin the root directory of the inventory. |
|
||||
| inventory | _directory_ | Ansible inventory. If multiple inventories exist can use sub folders. |
|
||||
| playbooks | _directory_ | Should be a git submodule. _This keeps inventory and playbooks SCM related to each only._ |
|
||||
| README.md | _file_ | Inventory readme with applicable info. |
|
||||
| templates | _directory_ | This directory is the same as the `files` directory except contains jinja templates. |
|
||||
|
||||
|
||||
### Inventory
|
||||
|
||||
Naming of host inventory files is to use the hostname portion of the FQDN only. i.e. for a host with a FQDN of `myhostname.domain.tld` it's `inventory_hostname` would be `myhostname`. This requirement is a must as many parts of our roles and playbooks depend upon this value matching the DNS system.
|
||||
|
||||
|
||||
#### hosts file
|
||||
|
||||
The hosts file `host.yaml` contains all hosts and by which group they are part of.
|
||||
|
||||
|
||||
### Playbooks
|
||||
|
||||
|
||||
### Templates
|
||||
|
||||
Templates directory contains only two sub-deirectories `groups` and `hosts` under each of these folders are folders by group/host name that contain template files. Preferernece is leaning toards not using the `.j2` extension as the IDE may loose functionality by using.
|
||||
|
||||
Naming of template files is in format `{item-type}-{what-uses}-{friendly name that uses underscores not hyphon}.{file_extension}`
|
||||
|
||||
| Item Type | what uses | Notes
|
||||
|:---|:---:|:---|
|
||||
| config | bind | Configuration file for bind dns server |
|
||||
| dnszone | bind | a bind server DNS zone |
|
||||
| `{kubernetes kind}` | manifest | A kubernetes manifest |
|
||||
|
||||
|
||||
#### Feature gates
|
||||
|
||||
Templates when added to the group folder should be setup with a feature gate. This eanbles simple yaml to be defined to allow the template to deploy.
|
||||
|
||||
example of yaml declaration that host/group would read.
|
||||
``` yaml
|
||||
feature_gates:
|
||||
is_prime: false
|
||||
monitoring: true
|
||||
operator_awx: true
|
||||
operator_grafana: true
|
||||
operator_prometheus: true
|
||||
postgres_cluster: true
|
||||
rook_ceph: true
|
||||
```
|
||||
|
||||
Seting a feature gate on a template is as simple as enclosing the entire contents of the file with a jinja if statement. i.e. `{% if path.feature_gates.monitoring | default(false) | bool %}the content here{% endif %}`
|
||||
|
||||
|
||||
## AWX / Tower / Automation Platform
|
||||
|
||||
|
||||
### Prime host
|
||||
|
||||
If you use a system like AWX / Tower / Automation Platform the inventory should be designed in a way that you have a prime host. The prime host is a single host that once it exists, it's capable of rebuilding all of the infrastructure within the inventory. Using the prime host method, you only require the variable secrets (vault encrypted) of the prime host and only those pertinent to rebuilding the prime host. This should only be the backup decryption key (vault encrypted).
|
||||
|
||||
!!! warning Warning
|
||||
Prime Host requires that the backup decryption key be updated within the inventory whenever it changes. There is also a requirement that the vault encryption key be available and not stored on infrastructure that without or that infrastructure not existing you cant access the vault key. i.e. password manager.
|
||||
|
||||
|
||||
## ToDo
|
||||
|
||||
- Explain usage of file `.inventory_root` which must exist as nfc_common _(todo: see kubernetes playbook/master)_ _may no longer be required a project structure is known along with using variable `playbook_dir`_
|
0
pages/projects/ansible/playbooks/index.md
Normal file
0
pages/projects/ansible/playbooks/index.md
Normal file
0
pages/projects/ansible/roles/common/index.md
Normal file
0
pages/projects/ansible/roles/common/index.md
Normal file
0
pages/projects/ansible/roles/firewall/index.md
Normal file
0
pages/projects/ansible/roles/firewall/index.md
Normal file
0
pages/projects/ansible/roles/homeassistant/index.md
Normal file
0
pages/projects/ansible/roles/homeassistant/index.md
Normal file
81
pages/projects/ansible/roles/index.md
Normal file
81
pages/projects/ansible/roles/index.md
Normal file
@ -0,0 +1,81 @@
|
||||
---
|
||||
title: Ansible Roles
|
||||
description: No Fuss Computings Ansible Roles Projects
|
||||
date: 2023-11-10
|
||||
template: project.html
|
||||
about: https://gitlab.com/nofusscomputing/projects/ansible
|
||||
---
|
||||
|
||||
This section of the website contains Ansible roles and the details of how to use said projects. Across All of our Ansible roles we standardize as much as possible. This document will contain the details of said standardization.
|
||||
|
||||
|
||||
Our roles:
|
||||
|
||||
- Common
|
||||
|
||||
- Docker Management
|
||||
|
||||
- [Firewall](firewall/index.md)
|
||||
|
||||
- Git Configuration
|
||||
|
||||
- [Home Assistant](homeassistant/index.md)
|
||||
|
||||
- [Kubernetes](kubernetes/index.md)
|
||||
|
||||
- SSH
|
||||
|
||||
|
||||
## Role Requirements
|
||||
|
||||
This section covers what by default, be part of all ansible roles we create.
|
||||
|
||||
|
||||
=== "ansible.builtin.set_stats"
|
||||
|
||||
As part of the role, setting of ansible stats with `ansible.builtin.set_stats` must be provided. This enables a single variable that can be used after the play has completed. Usage of a role that includes the usage of `ansible.builtin.set_stats` within AWX enables population of the artifacts and passing of the stats between workflows/job templates.
|
||||
|
||||
|
||||
```yaml
|
||||
- name: Stat Values
|
||||
ansible.builtin.set_fact:
|
||||
stat_values: |
|
||||
{
|
||||
"host_{{ inventory_hostname | replace('.', '_') | replace('-', '_') }}": {
|
||||
"roles": {
|
||||
role_name: {
|
||||
"enabled": true,
|
||||
"installed": false,
|
||||
"empty_list": [],
|
||||
"empty_dict": {}
|
||||
}
|
||||
},
|
||||
playbooks: {
|
||||
"{{ inventory_hostname }}": "here"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- name: Create Final Stats not Per Host
|
||||
ansible.builtin.set_stats:
|
||||
data: "{{ stat_values | from_yaml }}"
|
||||
per_host: false
|
||||
aggregate: true
|
||||
|
||||
- name: Clear Stat Values
|
||||
ansible.builtin.set_fact:
|
||||
stat_values: null
|
||||
```
|
||||
|
||||
- `Stat Values` is only required if the variable names require expansion. _Can be omitted if no variable expansion required for variable name._
|
||||
|
||||
- `Create Final Stats not Per Host` sets the artifacts/stats.
|
||||
|
||||
- `Clear Stat Values` remove the stat fact. only required if using `Stat Values`.
|
||||
|
||||
!!! tip AWX Gotcha
|
||||
AWX requires that `per_host` be set to `false` when setting stats for artifacts to work. Hence the structure of the artifacts above use hostname prefixed with `host_`. This method enables programatic checking if by host due to the presence of `host_` in the dictionary name.
|
||||
|
||||
=== "Variable naming"
|
||||
|
||||
- All Role Variables to be prefixed with the role name.
|
0
pages/projects/ansible/roles/kubernetes/index.md
Normal file
0
pages/projects/ansible/roles/kubernetes/index.md
Normal file
0
pages/projects/docker/bind/index.md
Normal file
0
pages/projects/docker/bind/index.md
Normal file
0
pages/projects/docker/index.md
Normal file
0
pages/projects/docker/index.md
Normal file
0
pages/projects/execution_environment/index.md
Normal file
0
pages/projects/execution_environment/index.md
Normal file
0
pages/projects/git_configuration/index.md
Normal file
0
pages/projects/git_configuration/index.md
Normal file
5
pages/projects/glpi/index.md
Normal file
5
pages/projects/glpi/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Docker GLPI
|
||||
|
||||
| :red_circle: This page is a placeholder for the python-gitlab-management repo's docs. |
|
||||
|:---|
|
||||
| _If you can see this page there has been an error, please report the issue on gitlab_ |
|
5
pages/projects/kubernetes_monitoring/index.md
Normal file
5
pages/projects/kubernetes_monitoring/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Docker GLPI
|
||||
|
||||
| :red_circle: This page is a placeholder for the python-gitlab-management repo's docs. |
|
||||
|:---|
|
||||
| _If you can see this page there has been an error, please report the issue on gitlab_ |
|
0
pages/projects/ldap_self_service/index.md
Normal file
0
pages/projects/ldap_self_service/index.md
Normal file
@ -91,18 +91,20 @@ class Data:
|
||||
|
||||
if 'gitlab.com/-/ide/project' not in url: # ignore gitlab ide links
|
||||
|
||||
link = self.parse_url(url)
|
||||
if 'nofusscomputing.com' not in url: # ignore gitlab ide links
|
||||
|
||||
hyperlink_source_file = {'name': source_file, 'location': link_location}
|
||||
link = self.parse_url(url)
|
||||
|
||||
if link['url_id'] in data['hyperlinks']:
|
||||
hyperlink_source_file = {'name': source_file, 'location': link_location}
|
||||
|
||||
data['hyperlinks'][link['url_id']]['source_files'].append(hyperlink_source_file)
|
||||
if link['url_id'] in data['hyperlinks']:
|
||||
|
||||
else:
|
||||
data['hyperlinks'][link['url_id']]['source_files'].append(hyperlink_source_file)
|
||||
|
||||
link['source_files'] = [ hyperlink_source_file ]
|
||||
data['hyperlinks'][link['url_id']] = link
|
||||
else:
|
||||
|
||||
link['source_files'] = [ hyperlink_source_file ]
|
||||
data['hyperlinks'][link['url_id']] = link
|
||||
|
||||
|
||||
events = [self.process_browser_log_entry(entry) for entry in self.driver.get_log('performance')]
|
||||
|
@ -13,7 +13,11 @@ class Test:
|
||||
|
||||
|
||||
def setup_method(self):
|
||||
pass
|
||||
self.ignore_url_alive_check = {
|
||||
'gitlab.com': [
|
||||
'nofusscomputing/infrastructure/website//-/new/development'
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@ -36,12 +40,29 @@ class Test:
|
||||
packages.urllib3.disable_warnings(category=InsecureRequestWarning)
|
||||
|
||||
request = get(data['url'], verify=False)
|
||||
skip_test = False
|
||||
|
||||
print(str(data) + str(request.status_code))
|
||||
|
||||
assert request.status_code == 200, (
|
||||
f"Hyperlink [{data['url_id']}] to location [{data['url']}] failed,"
|
||||
f"with status [{request.status_code}].")
|
||||
|
||||
if data['domain'] in self.ignore_url_alive_check:
|
||||
if data['request_path'] in self.ignore_url_alive_check[data['domain']]:
|
||||
skip_test = True
|
||||
|
||||
|
||||
if not skip_test:
|
||||
|
||||
assert (
|
||||
request.status_code == 200
|
||||
or
|
||||
request.status_code == 401
|
||||
or
|
||||
request.status_code == 403
|
||||
), (
|
||||
f"Hyperlink [{data['url_id']}] to location [{data['url']}] failed,"
|
||||
f"with status [{request.status_code}].")
|
||||
else:
|
||||
assert True
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
Submodule website-template updated: 4ea7ab29be...59b16501a6
Reference in New Issue
Block a user