Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfiles Ubuntu Xenial -> Bionic upgrade with python 3 #16

Merged
merged 10 commits into from
May 8, 2020

Conversation

dswebbthg
Copy link
Contributor

Seemingly only a few changes needed for the migration to bionic, gnupg as a package can't be found so had to preinstall gpg, some changes to the .welcome.sh file to support python3. Added in a separate commit for the staging-unstable repo as this probably won't get merged.

@Kami
Copy link
Member

Kami commented Jan 3, 2019

Thanks for the contribution.

For the time being we want to keep Xenial as a default. It will probably be a while until we can switch a default base image (we will need to ensure Python 3 stuff on Bionic has been running without any issues on large production deployments for a while, etc.).

The changes itself are good though and we should figure out how we can utilize them to allow people to test docker setup using Ubuntu Bionic as a base image.

Perhaps it should be user configurable some how, or maybe we should build another set of test containers with Bionic as a base image?

/cc @armab @warrenvw

@arm4b
Copy link
Member

arm4b commented Jan 4, 2019

Yes, exactly what @Kami said.

No quick plans in switching the base image, at least until we start supporting Bionic officially with all StackStorm Exchange packs being fully py3 compatible. I think we can start seriously thinking about Bionic in Docker around st2 v3.1+ release which is not that far away per https://docs.stackstorm.com/roadmap.html

We're not eager to keep optional Bionic images or separated repo fork until that happens.
However it's great to have this contribution ready & waiting for the future timing and I'm sure someone else from our users will find this PR helpful.
Thank you for this work @dswebbthg!

@arm4b arm4b added this to the v3.1 milestone Jan 4, 2019
@arm4b arm4b added feature WIP Work In Progress and removed WIP Work In Progress labels Jan 4, 2019
@arm4b arm4b self-assigned this Apr 23, 2020
@arm4b arm4b modified the milestones: later, prod Apr 23, 2020
base/Dockerfile Outdated
@@ -32,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=unstable; \
ST2_REPO=staging-unstable; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the difference between unstable and staging-unstable. Is switching to staging-unstable still "valid" a year later?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ytjohn
Copy link
Contributor

ytjohn commented May 1, 2020

As a note, I build all of the containers using bionic and deployed into a kubernetes cluster. Everything seems to be working. One other Dockerfile to consider updating is st2chatops/Dockerfile.

index 99b6164..7046338 100644
--- a/st2chatops/Dockerfile
+++ b/st2chatops/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:xenial
+FROM ubuntu:bionic

 ARG DEBIAN_FRONTEND=noninteractive

@@ -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
@@ -40,7 +41,7 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

 # Install st2chatops
 RUN if [ "${ST2_VERSION#*dev}" != "${ST2_VERSION}" ]; then \
-    ST2_REPO=unstable; \
+    ST2_REPO=staging-unstable; \
   else \
     ST2_REPO=stable; \
   fi \```

base/Dockerfile Outdated Show resolved Hide resolved
st2web/Dockerfile Outdated Show resolved Hide resolved
@arm4b
Copy link
Member

arm4b commented May 1, 2020

@ytjohn Awesome, can you create a PR for st2chatops?

armab added 2 commits May 6, 2020 17:37
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
```
@ytjohn
Copy link
Contributor

ytjohn commented May 6, 2020

@armab Thanks. I had created a downstream PR since I can't directly modify this one, but your pushes have incorporated them now.

@arm4b
Copy link
Member

arm4b commented May 6, 2020

Cool, I think I'm going to merge this soon.

The plan is to switch from Ubuntu:xenial to Ubuntu:bionic for the K8s Dockerfiles in next Helm chart version release via https://github.com/StackStorm/stackstorm-ha/blob/master/Chart.yaml#L3 change.

  • Old 3.2dev Dockerfiles will be based on old Xenial
  • The new 3.3dev Dokerfiles will be based on new Bionic

It will provide a migration path between the major versions.

This means StackStorm installation in K8s HA will be py3-based only from that point.

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dswebbthg for the contribution and @ytjohn for testing & trying it!

@arm4b arm4b merged commit 2f2b854 into StackStorm:master May 8, 2020
@arm4b arm4b mentioned this pull request May 8, 2020
arm4b pushed a commit to StackStorm/stackstorm-k8s that referenced this pull request May 8, 2020
@arm4b arm4b changed the title Bionic upgrade Ubuntu Xenial -> Bionic upgrade with python 3 May 18, 2020
@arm4b arm4b changed the title Ubuntu Xenial -> Bionic upgrade with python 3 Dockerfiles Ubuntu Xenial -> Bionic upgrade with python 3 May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants