From a72f2d0aaeb7ec8900a0c882820aee61daeb36de Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 18:14:46 -0400 Subject: [PATCH 01/20] traefik toml --- .gitignore | 1 + .../production/traefik/{traefik.toml => traefik.toml.template} | 0 scripts/install.sh | 1 + 3 files changed, 2 insertions(+) create mode 100644 .gitignore rename compose/production/traefik/{traefik.toml => traefik.toml.template} (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e737230 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +compose/production/traefik/traefik.toml diff --git a/compose/production/traefik/traefik.toml b/compose/production/traefik/traefik.toml.template similarity index 100% rename from compose/production/traefik/traefik.toml rename to compose/production/traefik/traefik.toml.template diff --git a/scripts/install.sh b/scripts/install.sh index 26c68f8..9685623 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -180,6 +180,7 @@ sudo mkdir -p ../mistborn_volumes/base/pihole/etc-dnsmasqd sudo mkdir -p ../mistborn_volumes/extra # Traefik final setup (cockpit) +cp ./compose/production/traefik/traefik.toml.template ./compose/production/traefik/traefik.toml sudo sed -i "s/IPV4_PUBLIC/$IPV4_PUBLIC/" ./compose/production/traefik/traefik.toml # Download docker images while DNS is operable From 6335ac152789f6a67b3fe1991730b673f987202f Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:26:56 -0400 Subject: [PATCH 02/20] adding to test --- .gitlab-ci.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b40318..a2bcf77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,17 +6,25 @@ services: variables: GIT_SUBMODULE_STRATEGY: "recursive" -before_script: - - apk add docker-compose - - docker info - - docker-compose --version +stages: + - test include: - template: Code-Quality.gitlab-ci.yml -test: +install: stage: test + image: ubuntu:18.04 script: + - scripts/install.sh + +docker_build: + stage: test + script: + - apk add docker-compose + - docker info + - docker-compose --version - scripts/subinstallers/gen_prod_env.sh "default_password" + - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml - docker-compose -f base.yml build From d146c95ecddce942a921859446fb379175d8ec9a Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:30:38 -0400 Subject: [PATCH 03/20] test installer --- .gitlab-ci.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a2bcf77..bd12c38 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,22 +9,25 @@ variables: stages: - test -include: - - template: Code-Quality.gitlab-ci.yml +#include: +# - template: Code-Quality.gitlab-ci.yml install: stage: test image: ubuntu:18.04 + before_script: + - apt-get install -y sudo git script: - scripts/install.sh -docker_build: - stage: test - script: - - apk add docker-compose - - docker info - - docker-compose --version - - scripts/subinstallers/gen_prod_env.sh "default_password" - - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml - - docker-compose -f base.yml build +#docker_build: +# stage: test +# before_script: +# - apk add docker-compose +# - docker info +# - docker-compose --version +# script: +# - scripts/subinstallers/gen_prod_env.sh "default_password" +# - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml +# - docker-compose -f base.yml build From 83e9bb24637d0f58687c39e0ed454f1b68ce6f06 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:32:17 -0400 Subject: [PATCH 04/20] update --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd12c38..19eb74b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,7 @@ install: stage: test image: ubuntu:18.04 before_script: + - apt-get update - apt-get install -y sudo git script: - scripts/install.sh From 97386e8bd58d71359c1dbdb7b14e2f91929d1f9a Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:36:04 -0400 Subject: [PATCH 05/20] default password --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19eb74b..94b1387 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ services: variables: GIT_SUBMODULE_STRATEGY: "recursive" + MISTBORN_DEFAULT_PASSWORD: "default_password" stages: - test @@ -28,7 +29,7 @@ install: # - docker info # - docker-compose --version # script: -# - scripts/subinstallers/gen_prod_env.sh "default_password" +# - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" # - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml # - docker-compose -f base.yml build From eb716fb7c32800f13660acfc76c4d261f890a12a Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:41:49 -0400 Subject: [PATCH 06/20] skip iptables --- .gitlab-ci.yml | 2 ++ scripts/install.sh | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94b1387..e63f84c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,8 @@ stages: install: stage: test image: ubuntu:18.04 + variables: + MISTBORN_TEST_SKIP_IPTABLES: "true" before_script: - apt-get update - apt-get install -y sudo git diff --git a/scripts/install.sh b/scripts/install.sh index 9685623..48fe4e2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -94,7 +94,12 @@ source ./scripts/subinstallers/platform.sh echo "Setting up firewall (iptables)" if [ ! -f "/etc/iptables/rules.v4" ]; then echo "Setting iptables rules..." - ./scripts/subinstallers/iptables.sh + + if [ -z "${MISTBORN_TEST_SKIP_IPTABLES}" ]; then + ./scripts/subinstallers/iptables.sh + else + echo "Test conditions: not running iptables.sh" + fi else echo "iptables rules exist. Leaving alone." fi From 4bed2e9de8ac36930e1d2cd4bb7fc1bfc47f555e Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:48:41 -0400 Subject: [PATCH 07/20] show var --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e63f84c..15c3597 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,6 +22,7 @@ install: - apt-get update - apt-get install -y sudo git script: + - echo "MISTBORN_TEST_SKIP_IPTABLES: ${MISTBORN_TEST_SKIP_IPTABLES}" - scripts/install.sh #docker_build: From 1d1d4f95168908f733ace86ac5a8f549f2df167c Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:50:12 -0400 Subject: [PATCH 08/20] syntax --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 15c3597..aec57cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ install: - apt-get update - apt-get install -y sudo git script: - - echo "MISTBORN_TEST_SKIP_IPTABLES: ${MISTBORN_TEST_SKIP_IPTABLES}" + - echo "MISTBORN_TEST_SKIP_IPTABLES: $MISTBORN_TEST_SKIP_IPTABLES" - scripts/install.sh #docker_build: From d8fa12080eeaca8b7dd4ec1b01ab28b8a026fd77 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:55:03 -0400 Subject: [PATCH 09/20] syntax --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aec57cc..c5c2037 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,8 @@ install: - apt-get update - apt-get install -y sudo git script: - - echo "MISTBORN_TEST_SKIP_IPTABLES: $MISTBORN_TEST_SKIP_IPTABLES" + - echo "MISTBORN_TEST_SKIP_IPTABLES: " + - echo $MISTBORN_TEST_SKIP_IPTABLES - scripts/install.sh #docker_build: From ec0623081baf46e14ae3f4f31ad9f18cd064df8b Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 22:56:28 -0400 Subject: [PATCH 10/20] syntax --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5c2037..87ce653 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ install: - apt-get update - apt-get install -y sudo git script: - - echo "MISTBORN_TEST_SKIP_IPTABLES: " + - echo "MISTBORN_TEST_SKIP_IPTABLES:" - echo $MISTBORN_TEST_SKIP_IPTABLES - scripts/install.sh From b22e8c91fde3bcede256a4cbff09d92b4b4c92d5 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Fri, 20 Mar 2020 23:05:50 -0400 Subject: [PATCH 11/20] passing skip iptables --- scripts/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 48fe4e2..c5f8d71 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -37,7 +37,7 @@ if [ $(whoami) != "$MISTBORN_USER" ]; then sudo cp $FULLPATH /home/$MISTBORN_USER sudo chown $MISTBORN_USER:$MISTBORN_USER /home/$MISTBORN_USER/$FILENAME - sudo SSH_CLIENT="$SSH_CLIENT" MISTBORN_DEFAULT_PASSWORD="$MISTBORN_DEFAULT_PASSWORD" GIT_BRANCH="$GIT_BRANCH" -i -u $MISTBORN_USER bash -c "/home/$MISTBORN_USER/$FILENAME" # self-referential call + sudo SSH_CLIENT="$SSH_CLIENT" MISTBORN_DEFAULT_PASSWORD="$MISTBORN_DEFAULT_PASSWORD" GIT_BRANCH="$GIT_BRANCH" MISTBORN_TEST_SKIP_IPTABLES="$MISTBORN_TEST_SKIP_IPTABLES" -i -u $MISTBORN_USER bash -c "/home/$MISTBORN_USER/$FILENAME" # self-referential call exit 0 fi From 40902d39978361d71869e73d059e74148f13edc3 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:26:12 -0400 Subject: [PATCH 12/20] systemctl --- scripts/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index c5f8d71..6817256 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -111,7 +111,7 @@ sudo sed -i 's/#PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/ss sudo sed -i 's/PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config sudo sed -i 's/#PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config sudo sed -i 's/PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config -sudo systemctl restart ssh +sudo systemctl restart ssh || true # Additional tools fail2ban sudo apt-get install -y dnsutils fail2ban @@ -159,9 +159,9 @@ fi sudo cp ./scripts/conf/20auto-upgrades /etc/apt/apt.conf.d/ sudo cp ./scripts/conf/50unattended-upgrades /etc/apt/apt.conf.d/ -sudo systemctl stop unattended-upgrades -sudo systemctl daemon-reload -sudo systemctl restart unattended-upgrades +sudo systemctl stop unattended-upgrades || true +sudo systemctl daemon-reload || true +sudo systemctl restart unattended-upgrades || true # setup Mistborn services From 29423d6f7b3dc49ef899bf3e410a34d20fdb0637 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:32:43 -0400 Subject: [PATCH 13/20] ubuntu --- .gitlab-ci.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87ce653..959b6c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: docker:latest +image: ubuntu:18.04 services: - docker:dind @@ -13,27 +13,27 @@ stages: #include: # - template: Code-Quality.gitlab-ci.yml -install: - stage: test - image: ubuntu:18.04 - variables: - MISTBORN_TEST_SKIP_IPTABLES: "true" - before_script: - - apt-get update - - apt-get install -y sudo git - script: - - echo "MISTBORN_TEST_SKIP_IPTABLES:" - - echo $MISTBORN_TEST_SKIP_IPTABLES - - scripts/install.sh - -#docker_build: +#install: # stage: test +# image: ubuntu:18.04 +# variables: +# MISTBORN_TEST_SKIP_IPTABLES: "true" # before_script: -# - apk add docker-compose -# - docker info -# - docker-compose --version +# - apt-get update +# - apt-get install -y sudo git # script: -# - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" -# - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml -# - docker-compose -f base.yml build +# - echo "MISTBORN_TEST_SKIP_IPTABLES:" +# - echo $MISTBORN_TEST_SKIP_IPTABLES +# - scripts/install.sh + +docker_build: + stage: test + before_script: + - apk add docker-compose + - docker info + - docker-compose --version + script: + - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" + - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml + - docker-compose -f base.yml build From 40af88c85228ff239c8cad45f6ee3efc2a4717a4 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:37:39 -0400 Subject: [PATCH 14/20] pip3 install docker-compose --- .gitlab-ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 959b6c3..db1d355 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,15 @@ services: variables: GIT_SUBMODULE_STRATEGY: "recursive" MISTBORN_DEFAULT_PASSWORD: "default_password" + +before_script: + #- apk add docker-compose + - apt-get update + - apt-get + - apt install -y python python3-pip libffi-dev python-backports.ssl-match-hostname + - pip3 install docker-compose + - docker info + - docker-compose --version stages: - test @@ -28,10 +37,6 @@ stages: docker_build: stage: test - before_script: - - apk add docker-compose - - docker info - - docker-compose --version script: - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml From 3fd9ebe480294c78c1c0316d39524cd2821f1830 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:39:27 -0400 Subject: [PATCH 15/20] syntax mistake --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db1d355..24000c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ variables: before_script: #- apk add docker-compose - apt-get update - - apt-get - apt install -y python python3-pip libffi-dev python-backports.ssl-match-hostname - pip3 install docker-compose - docker info From fbdb888abb333d62e910c1687cfccc25faf98da2 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:43:04 -0400 Subject: [PATCH 16/20] docker install --- .gitlab-ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24000c3..97ffdae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,11 +9,9 @@ variables: before_script: #- apk add docker-compose - - apt-get update - - apt install -y python python3-pip libffi-dev python-backports.ssl-match-hostname - - pip3 install docker-compose - - docker info - - docker-compose --version + - scripts/subinstallers/docker.sh + - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" + - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml stages: - test @@ -37,7 +35,5 @@ stages: docker_build: stage: test script: - - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" - - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml - docker-compose -f base.yml build From 41a9e64ffb6c8d0581acfd49b628e26ec49a5e76 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:44:50 -0400 Subject: [PATCH 17/20] sudo --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97ffdae..409c785 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,8 @@ variables: before_script: #- apk add docker-compose + - apt-get update + - apt-get install -y sudo - scripts/subinstallers/docker.sh - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml From 468ca11d8cfdf03f0bb1737611adaf1ddf18a1a9 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:49:16 -0400 Subject: [PATCH 18/20] docker --- .gitlab-ci.yml | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 409c785..0237d1b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: ubuntu:18.04 +image: docker:latest services: - docker:dind @@ -7,35 +7,17 @@ variables: GIT_SUBMODULE_STRATEGY: "recursive" MISTBORN_DEFAULT_PASSWORD: "default_password" -before_script: - #- apk add docker-compose - - apt-get update - - apt-get install -y sudo - - scripts/subinstallers/docker.sh - - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" - - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml - stages: - test #include: # - template: Code-Quality.gitlab-ci.yml -#install: -# stage: test -# image: ubuntu:18.04 -# variables: -# MISTBORN_TEST_SKIP_IPTABLES: "true" -# before_script: -# - apt-get update -# - apt-get install -y sudo git -# script: -# - echo "MISTBORN_TEST_SKIP_IPTABLES:" -# - echo $MISTBORN_TEST_SKIP_IPTABLES -# - scripts/install.sh - docker_build: stage: test script: + - apk add docker-compose + - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" + - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml - docker-compose -f base.yml build From 2609726420a06ffacb6b086492a021bb524b02a9 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:54:12 -0400 Subject: [PATCH 19/20] orig install.sh --- scripts/install.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 6817256..9685623 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -37,7 +37,7 @@ if [ $(whoami) != "$MISTBORN_USER" ]; then sudo cp $FULLPATH /home/$MISTBORN_USER sudo chown $MISTBORN_USER:$MISTBORN_USER /home/$MISTBORN_USER/$FILENAME - sudo SSH_CLIENT="$SSH_CLIENT" MISTBORN_DEFAULT_PASSWORD="$MISTBORN_DEFAULT_PASSWORD" GIT_BRANCH="$GIT_BRANCH" MISTBORN_TEST_SKIP_IPTABLES="$MISTBORN_TEST_SKIP_IPTABLES" -i -u $MISTBORN_USER bash -c "/home/$MISTBORN_USER/$FILENAME" # self-referential call + sudo SSH_CLIENT="$SSH_CLIENT" MISTBORN_DEFAULT_PASSWORD="$MISTBORN_DEFAULT_PASSWORD" GIT_BRANCH="$GIT_BRANCH" -i -u $MISTBORN_USER bash -c "/home/$MISTBORN_USER/$FILENAME" # self-referential call exit 0 fi @@ -94,12 +94,7 @@ source ./scripts/subinstallers/platform.sh echo "Setting up firewall (iptables)" if [ ! -f "/etc/iptables/rules.v4" ]; then echo "Setting iptables rules..." - - if [ -z "${MISTBORN_TEST_SKIP_IPTABLES}" ]; then - ./scripts/subinstallers/iptables.sh - else - echo "Test conditions: not running iptables.sh" - fi + ./scripts/subinstallers/iptables.sh else echo "iptables rules exist. Leaving alone." fi @@ -111,7 +106,7 @@ sudo sed -i 's/#PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/ss sudo sed -i 's/PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config sudo sed -i 's/#PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config sudo sed -i 's/PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config -sudo systemctl restart ssh || true +sudo systemctl restart ssh # Additional tools fail2ban sudo apt-get install -y dnsutils fail2ban @@ -159,9 +154,9 @@ fi sudo cp ./scripts/conf/20auto-upgrades /etc/apt/apt.conf.d/ sudo cp ./scripts/conf/50unattended-upgrades /etc/apt/apt.conf.d/ -sudo systemctl stop unattended-upgrades || true -sudo systemctl daemon-reload || true -sudo systemctl restart unattended-upgrades || true +sudo systemctl stop unattended-upgrades +sudo systemctl daemon-reload +sudo systemctl restart unattended-upgrades # setup Mistborn services From f5346d382aa8fc678c289caf850c8fdc60e85263 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 21 Mar 2020 00:55:47 -0400 Subject: [PATCH 20/20] code quality --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0237d1b..f56b619 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: docker:latest +image: docker:latest services: - docker:dind @@ -10,14 +10,14 @@ variables: stages: - test -#include: -# - template: Code-Quality.gitlab-ci.yml +include: + - template: Code-Quality.gitlab-ci.yml docker_build: stage: test script: - apk add docker-compose - scripts/subinstallers/gen_prod_env.sh "$MISTBORN_DEFAULT_PASSWORD" - - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml - - docker-compose -f base.yml build + - cp compose/production/traefik/traefik.toml.template compose/production/traefik/traefik.toml + - docker-compose -f base.yml build