From a6d7563d33a2a7537a52f656bca1b5045b2412c0 Mon Sep 17 00:00:00 2001 From: Danny Webb Date: Thu, 3 Jan 2019 15:01:02 +0000 Subject: [PATCH 1/9] change to the bionic repos and also install gpg because the install script tries to install gnupg which isn't found in the repos --- base/Dockerfile | 3 ++- st2web/Dockerfile | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index f07783d2..d142bda8 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:bionic ARG DEBIAN_FRONTEND=noninteractive @@ -23,6 +23,7 @@ RUN apt-get -qq update \ && apt-get install -y \ curl \ locales \ + gpg \ && rm -rf /var/lib/apt/lists/* \ && locale-gen en_US.UTF-8 \ && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 diff --git a/st2web/Dockerfile b/st2web/Dockerfile index 2116a303..043668a2 100644 --- a/st2web/Dockerfile +++ b/st2web/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:bionic ARG DEBIAN_FRONTEND=noninteractive @@ -28,6 +28,7 @@ RUN apt-get -qq update \ && apt-get install -y \ curl \ locales \ + gpg \ && rm -rf /var/lib/apt/lists/* \ && locale-gen en_US.UTF-8 \ && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 @@ -36,7 +37,7 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' # Install nginx RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ABF5BD827BD9BF62 \ - && echo "deb http://nginx.org/packages/ubuntu/ xenial nginx" > /etc/apt/sources.list.d/nginx.list \ + && echo "deb http://nginx.org/packages/ubuntu/ bionic nginx" > /etc/apt/sources.list.d/nginx.list \ && apt-get update \ && apt-get install -y nginx \ && rm -f /etc/apt/sources.list.d/nginx.list From ee2798b07d96606f2c047b40b82d5cd480a3e119 Mon Sep 17 00:00:00 2001 From: Danny Webb Date: Thu, 3 Jan 2019 15:02:07 +0000 Subject: [PATCH 2/9] python3 no longer supports execfile, so switching to exec and opening the file --- base/files/.welcome.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/files/.welcome.sh b/base/files/.welcome.sh index 144f1d16..a22aacfa 100644 --- a/base/files/.welcome.sh +++ b/base/files/.welcome.sh @@ -1,7 +1,7 @@ #!/bin/bash # Get st2 version based on hardcoded string in st2common -ST2_VERSION=$(/opt/stackstorm/st2/bin/python -c 'execfile("/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/__init__.py"); print __version__') +ST2_VERSION=$(/opt/stackstorm/st2/bin/python -c 'exec(open("/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/__init__.py").read()); print __version__') printf "Welcome to \033[1;38;5;208mStackStorm HA\033[0m \033[1m%s\033[0m (Ubuntu 16.04 LTS %s %s)\n" "v${ST2_VERSION}" "$(uname -o)" "$(uname -m)" printf " * Documentation: https://docs.stackstorm.com/\n" printf " * Community: https://stackstorm.com/community-signup\n" From 8a32a16cdee214a0c7357b4561e44c29c33108ba Mon Sep 17 00:00:00 2001 From: Danny Webb Date: Thu, 3 Jan 2019 15:07:34 +0000 Subject: [PATCH 3/9] only staging-unstable currently has the bionic packages --- base/Dockerfile | 2 +- st2web/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index d142bda8..178e42d7 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -33,7 +33,7 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' # Install StackStorm, but without UI RUN if [ "${ST2_VERSION#*dev}" != "${ST2_VERSION}" ]; then \ - ST2_REPO=unstable; \ + ST2_REPO=staging-unstable; \ else \ ST2_REPO=stable; \ fi \ diff --git a/st2web/Dockerfile b/st2web/Dockerfile index 043668a2..e9387d0e 100644 --- a/st2web/Dockerfile +++ b/st2web/Dockerfile @@ -44,7 +44,7 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ABF5BD827B # Install StackStorm Web UI RUN if [ "${ST2_VERSION#*dev}" != "${ST2_VERSION}" ]; then \ - ST2_REPO=unstable; \ + ST2_REPO=staging-unstable; \ else \ ST2_REPO=stable; \ fi \ From 4006e86ff4dc87fea510f60b7a62db22fcbedb83 Mon Sep 17 00:00:00 2001 From: Danny Webb Date: Thu, 3 Jan 2019 15:11:03 +0000 Subject: [PATCH 4/9] changing the print to print() to support python3 --- base/files/.welcome.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/files/.welcome.sh b/base/files/.welcome.sh index a22aacfa..7a64aa64 100644 --- a/base/files/.welcome.sh +++ b/base/files/.welcome.sh @@ -1,7 +1,7 @@ #!/bin/bash # Get st2 version based on hardcoded string in st2common -ST2_VERSION=$(/opt/stackstorm/st2/bin/python -c 'exec(open("/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/__init__.py").read()); print __version__') +ST2_VERSION=$(/opt/stackstorm/st2/bin/python -c 'exec(open("/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/__init__.py").read()); print(__version__)') printf "Welcome to \033[1;38;5;208mStackStorm HA\033[0m \033[1m%s\033[0m (Ubuntu 16.04 LTS %s %s)\n" "v${ST2_VERSION}" "$(uname -o)" "$(uname -m)" printf " * Documentation: https://docs.stackstorm.com/\n" printf " * Community: https://stackstorm.com/community-signup\n" From 3a337e8869d74fa79a908bd931921ec1fc1176c0 Mon Sep 17 00:00:00 2001 From: Danny Webb Date: Thu, 3 Jan 2019 15:36:47 +0000 Subject: [PATCH 5/9] adding lsb-release package so the ubuntu version is dynamically generated in .welcome.sh --- base/Dockerfile | 1 + base/files/.welcome.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/base/Dockerfile b/base/Dockerfile index 178e42d7..318ad0d0 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -24,6 +24,7 @@ RUN apt-get -qq update \ curl \ locales \ gpg \ + lsb-release \ && rm -rf /var/lib/apt/lists/* \ && locale-gen en_US.UTF-8 \ && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 diff --git a/base/files/.welcome.sh b/base/files/.welcome.sh index 7a64aa64..a2390b08 100644 --- a/base/files/.welcome.sh +++ b/base/files/.welcome.sh @@ -2,7 +2,8 @@ # Get st2 version based on hardcoded string in st2common ST2_VERSION=$(/opt/stackstorm/st2/bin/python -c 'exec(open("/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/__init__.py").read()); print(__version__)') -printf "Welcome to \033[1;38;5;208mStackStorm HA\033[0m \033[1m%s\033[0m (Ubuntu 16.04 LTS %s %s)\n" "v${ST2_VERSION}" "$(uname -o)" "$(uname -m)" +UBUNTU_VERSION=$(lsb_release -s -d) +printf "Welcome to \033[1;38;5;208mStackStorm HA\033[0m \033[1m%s\033[0m (${UBUNTU_VERSION} %s %s)\n" "v${ST2_VERSION}" "$(uname -o)" "$(uname -m)" printf " * Documentation: https://docs.stackstorm.com/\n" printf " * Community: https://stackstorm.com/community-signup\n" printf " * Forum: https://forum.stackstorm.com/\n" From 9610be390732d80ca771f60268a5e063ca880e6c Mon Sep 17 00:00:00 2001 From: Eugen C Date: Fri, 1 May 2020 18:40:36 +0100 Subject: [PATCH 6/9] Revert base/Dockerfile to use unstable repo --- base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/Dockerfile b/base/Dockerfile index 2628ba26..ebd6800e 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -34,7 +34,7 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' # Install StackStorm, but without UI RUN if [ "${ST2_VERSION#*dev}" != "${ST2_VERSION}" ]; then \ - ST2_REPO=staging-unstable; \ + ST2_REPO=unstable; \ else \ ST2_REPO=stable; \ fi \ From 6d62fdad3e0038498a2932f440141ffe1f38d864 Mon Sep 17 00:00:00 2001 From: Eugen C Date: Fri, 1 May 2020 18:41:13 +0100 Subject: [PATCH 7/9] Revert st2web/Dockerfile to use unstable repo --- st2web/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2web/Dockerfile b/st2web/Dockerfile index 68d3e551..4631ebf3 100644 --- a/st2web/Dockerfile +++ b/st2web/Dockerfile @@ -45,7 +45,7 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ABF5BD827B # Install StackStorm Web UI RUN if [ "${ST2_VERSION#*dev}" != "${ST2_VERSION}" ]; then \ - ST2_REPO=staging-unstable; \ + ST2_REPO=unstable; \ else \ ST2_REPO=stable; \ fi \ From 18b00ecf7fee51a770bcb9f247ba8a93c6e036ed Mon Sep 17 00:00:00 2001 From: armab Date: Wed, 6 May 2020 17:37:05 +0100 Subject: [PATCH 8/9] Switch to Ubuntu:bionic for st2chatops --- st2chatops/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2chatops/Dockerfile b/st2chatops/Dockerfile index 99b61641..f02b8b25 100644 --- a/st2chatops/Dockerfile +++ b/st2chatops/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:bionic ARG DEBIAN_FRONTEND=noninteractive From f9eeba34533515cdffd6731e06d8b41a835a51da Mon Sep 17 00:00:00 2001 From: armab Date: Wed, 6 May 2020 17:43:24 +0100 Subject: [PATCH 9/9] Add gpg for st2chatops to fix Packagecloud repo add issue Fixes Packagecloud add repo issue: ``` Package gnupg is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Unable to install GPG! Your base system has a problem; please check your default OS's package repositories because GPG should work. Repository installation aborted. E: Package 'gnupg' has no installation candidate ``` --- st2chatops/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/st2chatops/Dockerfile b/st2chatops/Dockerfile index f02b8b25..f5c11b5a 100644 --- a/st2chatops/Dockerfile +++ b/st2chatops/Dockerfile @@ -31,6 +31,7 @@ RUN apt-get -qq update \ && apt-get install -y \ curl \ locales \ + gpg \ && rm -rf /var/lib/apt/lists/* \ && locale-gen en_US.UTF-8 \ && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8