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

Drop U16 and add U20 support #298

Merged
merged 29 commits into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9435ef4
Update the mongodb role for 3.5 with support for Ubuntu 20.04 and mon…
winem May 29, 2021
c742b49
Update the nginx role and add support for Ubuntu 20.04
winem May 29, 2021
d14ff4b
Update the nodejs role and add support for Ubuntu 20.04
winem May 29, 2021
3328cd5
Update the rabbitmq role and add support for Ubuntu 20.04
winem May 29, 2021
30ae235
Update the st2 role and add support for Ubuntu 20.04
winem May 29, 2021
cdf4edd
Update the st2chatops role and add support for Ubuntu 20.04
winem May 29, 2021
fea314a
Update the st2repo role and add support for Ubuntu 20.04
winem May 29, 2021
e459e2d
Update the st2web role and add support for Ubuntu 20.04
winem May 29, 2021
8de0474
Remove xenial from the meta/main.yml files
winem Jun 5, 2021
5be261c
Add missing meta/main.yml files for smoketests and redis role
winem Jun 5, 2021
07f8fe8
Update the Readme: Remove U16 and add U20
winem Jun 5, 2021
f40f64a
Update vagrant command to run ubuntu 20 in the readme
winem Jun 5, 2021
0477531
Drop the py3.6 check for U16 and st2_u16_add_insecure_py3_ppa from th…
winem Jun 5, 2021
1a7770e
Update conditional to enable the redis to be controlled by systemd (r…
winem Jun 5, 2021
1f57b18
Remove U16 and add U20 box from/to the vagrant file
winem Jun 5, 2021
f07c594
Drop support for mongodb versions that are already end of life (3.2, …
winem Jun 6, 2021
13891cd
Drop xenial from the st2/meta/main.yml
winem Jun 7, 2021
9845575
Add variables file for mongodb on ubuntu 20
winem Jun 8, 2021
a6cb718
Distinguish between U18 and U20 in the st2 role
winem Jun 8, 2021
0d888d8
Remove apt keys for mongodb versions that aren't supported on U20
winem Jun 8, 2021
df3e85c
Optimize variable handling for Debian/Ubuntu in the mongodb role
winem Jun 8, 2021
ee32017
Update roles/StackStorm.st2/tasks/auth.yml
winem Jun 8, 2021
44297bc
Remove incorrect dependency between the redis and st2repo role
winem Jun 8, 2021
c3db3c5
Merge branch 'ubuntu-2004-support' of pgithub.com:winem/ansible-st2 i…
winem Jun 8, 2021
857bf7f
Remove the key for mongodb 4.2 as long as we don't officially support it
winem Jun 8, 2021
3665342
Set mongodb version in the defaults with 4.4 for U20
winem Jun 9, 2021
27b93c3
Update the .kitchen and .travis CI files to run tests on U20 instead …
winem Jun 9, 2021
cce9bc2
Update .kitchen.yml
winem Jun 9, 2021
365027a
Trigger new Travis build
Jul 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ provisioner:
st2_rbac_enable: yes

platforms:
# Ubuntu Xenial with Systemd
- name: ubuntu-16.04
# Ubuntu Bionic with Systemd
- name: ubuntu-18.04
driver_config:
image: stackstorm/packagingtest:xenial-systemd
image: stackstorm/packagingtest:bionic-systemd
platform: ubuntu
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
# Ubuntu Bionic with Systemd
- name: ubuntu-18.04
# Ubuntu Focal with Systemd
- name: ubuntu-20.04
driver_config:
image: stackstorm/packagingtest:bionic-systemd
image: stackstorm/packagingtest:focal-systemd
platform: ubuntu
run_command: /sbin/init
volume:
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ branches:

env:
# default is stable repo
- DISTRO=ubuntu-16
- DISTRO=ubuntu-18
- DISTRO=ubuntu-20
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to remove ubuntu-20 from here. We can't run it as a stable run yet until 3.5 is released.
So we need to do the changes for ansible-st2 in 2 stages.

  1. add it to unstable before release - under this PR
  2. add it to stable after release - separate PR

Copy link
Member

Choose a reason for hiding this comment

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

I think we'll just have to wait for a release to happen before merging this PR.

Otherwise, someone using the fresh Ansible installer will have the same issues with U16/U20.

- DISTRO=centos-7
- DISTRO=centos-8

# StackStorm 'unstable' repo check
- DISTRO=ubuntu-16 ST2_REPO=unstable
- DISTRO=ubuntu-18 ST2_REPO=unstable
- DISTRO=ubuntu-20 ST2_REPO=unstable
- DISTRO=centos-7 ST2_REPO=unstable
- DISTRO=centos-8 ST2_REPO=unstable

Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Aka IFTTT orchestration for Ops.
[![Join our community Slack](https://stackstorm-community.herokuapp.com/badge.svg)](https://stackstorm.com/community-signup)

## Supported platforms
* Ubuntu Xenial (16.04)
* Ubuntu Bionic (18.04)
* Ubuntu Focal (20.04)
* RHEL7 / CentOS7
* RHEL8 / CentOS8

Expand All @@ -19,7 +19,7 @@ Aka IFTTT orchestration for Ops.
> In order to access StackStorm Web UI, please don't forget to ensure that http/https ports are opened in your firewall system.

## Requirements
At least 2GB of memory and 3.5GB of disk space is required, since StackStorm is shipped with RabbitMQ, Mongo and nginx.
At least 2GB of memory and 3.5GB of disk space is required, since StackStorm is shipped with RabbitMQ, Mongo, Redis and nginx.

## Installation
```sh
Expand Down Expand Up @@ -50,7 +50,6 @@ Below is the list of variables you can redefine in your playbook to customize st
| `st2_ldap` | [See `st2_ldap` variable in role defaults](roles/st2/defaults/main.yml) | Settings for LDAP authentication backend. `st2_ldap` is a dictionary and has one item `backend_kwargs`. `backend_kwargs` should be provided as exactly listed in ST2 documentation for [LDAP configuration](https://docs.stackstorm.com/authentication.html#ldap).
| `st2_packs` | `[ st2 ]` | List of packs to install. This flag does not work with a `--python3` only pack.
| `st2_python_packages` | `[ ]` | List of python packages to install into the `/opt/stackstorm/st2` virtualenv. This is needed when deploying alternative auth or coordination backends which depend on Python modules to make them work.
| `st2_u16_add_insecure_py3_ppa` | `false` | Whether permission is granted to install the deadsnakes Python3.6 PPA for Ubuntu 16.
| **st2web**
| `st2web_version` | `latest` | st2web version to install. `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0` or with revision like `2.2.0-1`.
| `st2web_ssl_certificate` | `null` | String with custom SSL certificate (`.crt`). If not provided, self-signed certificate will be generated.
Expand Down Expand Up @@ -93,8 +92,8 @@ st2smoketests, you will need to disable proxy for localhost.
There are a few requirements when developing on `ansible-st2`.

These are the platforms we must support (must pass end-to-end testing):
- Ubuntu Xenial
- Ubuntu Bionic
- Ubuntu Focal
- CentOS7
- CentOS8
- RHEL7 (via AWS)
Expand All @@ -109,7 +108,7 @@ vagrant up

Other distros:
```sh
vagrant up ubuntu16
vagrant up ubuntu20
vagrant up centos7
vagrant up centos8
```
Expand All @@ -120,8 +119,8 @@ You might be interested in other methods to deploy StackStorm engine:
* [Puppet Module](https://github.com/stackstorm/puppet-st2)

* Manual Instructions
* [Ubuntu 16.04](https://docs.stackstorm.com/install/u16.html)
* [Ubuntu 18.04](https://docs.stackstorm.com/install/u18.html)
* [Ubuntu 20.04](https://docs.stackstorm.com/install/u20.html)
* [RHEL8/CentOS8](https://docs.stackstorm.com/install/rhel8.html)
* [RHEL7/CentOS7](https://docs.stackstorm.com/install/rhel7.html)

Expand Down
8 changes: 4 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# vi: set ft=ruby :

VIRTUAL_MACHINES = {
:ubuntu16 => {
:hostname => 'ansible-st2-ubuntu16',
:box => 'ubuntu/xenial64',
},
:ubuntu18 => {
:hostname => 'ansible-st2-ubuntu18',
:box => 'ubuntu/bionic64',
},
:ubuntu20 => {
:hostname => 'ansible-st2-ubuntu20',
:box => 'ubuntu/focal64',
},
:centos7 => {
:hostname => 'ansible-st2-centos7',
:box => 'centos/7',
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down
2 changes: 1 addition & 1 deletion roles/StackStorm.mongodb/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
# MongoDB default version
mongodb_version: "4.0"
mongodb_version: "{% if ansible_facts.os_family == 'Debian' and ansible_facts.distribution_major_version == '20' %}4.4{% else %}4.0{% endif %}"
Copy link
Member

Choose a reason for hiding this comment

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

To decide between 4.0 and 4.4 mongo version, wouldn't it be a better idea to use st2 version > 3.4 rather than only on Ubuntu 20?

Copy link
Contributor

@amanda11 amanda11 Jun 23, 2021

Choose a reason for hiding this comment

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

@rush-skills Stackstorm 3.5 still uses mongo 4.0 for all OSes EXCEPT for Ubuntu 20

2 changes: 1 addition & 1 deletion roles/StackStorm.mongodb/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down
3 changes: 1 addition & 2 deletions roles/StackStorm.mongodb/vars/debian.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Use the following URL to find the key: https://www.mongodb.org/static/pgp/server-{{ mongodb_major_minor_version }}.asc
mongodb_apt_keys:
"3.2": "42F3E95A2C4F08279C4960ADD68FA50FEA312927"
"3.4": "0C49F3730359A14518585931BC711F9BA15703C6"
"3.6": "2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5"
"4.0": "9DA31620334BD75D9DCB49F368818C72E52529D4"
"4.4": "20691EEC35216C63CAF66CE1656408E390CFB1F5"
2 changes: 1 addition & 1 deletion roles/StackStorm.nginx/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down
2 changes: 1 addition & 1 deletion roles/StackStorm.nodejs/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down
2 changes: 1 addition & 1 deletion roles/StackStorm.rabbitmq/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down
26 changes: 26 additions & 0 deletions roles/StackStorm.redis/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
galaxy_info:
description: Install redis as Stackstorm coordination backend
author: winem
company: StackStorm
license: Apache 2.0
min_ansible_version: 2.5
platforms:
- name: Ubuntu
versions:
- bionic
- focal
- name: EL
versions:
- 7
- 8
galaxy_tags:
- system
- stackstorm
- st2
- automation
- remediation
- devops
dependencies:
- role: StackStorm.epel
when: ansible_facts.os_family == 'RedHat'
2 changes: 1 addition & 1 deletion roles/StackStorm.redis/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
dest: /etc/redis/redis.conf
line: supervised systemd
tags: redis
when: ansible_facts.os_family == 'Debian' and ansible_facts.distribution_major_version != "16"
when: ansible_facts.os_family == 'Debian'

- name: Change bind to be ipv4 only if needed
become: yes
Expand Down
7 changes: 0 additions & 7 deletions roles/StackStorm.st2/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,3 @@ st2_packs:

# Additional python packages to install
st2_python_packages: []

# Whether permission is granted to install the deadsnakes Python3.6 PPA for Ubuntu 16.
#The python3.6 package is a required dependency for the StackStorm st2 package but that is not installable from any of the default Ubuntu 16.04 repositories.
#We recommend switching to Ubuntu 18.04 LTS (Bionic) as a base OS. Support for Ubuntu 16.04 will be removed with future StackStorm versions.
#Alternatively the playbooks will try to add python3.6 from the 3rd party 'deadsnakes' repository: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.
#Only set to true, if you are aware of the support and security risks associated with using unofficial 3rd party PPA repository, and you understand that StackStorm does NOT provide ANY support for python3.6 packages on Ubuntu 16.04.
st2_u16_add_insecure_py3_ppa: false
2 changes: 1 addition & 1 deletion roles/StackStorm.st2/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down
17 changes: 8 additions & 9 deletions roles/StackStorm.st2/tasks/auth.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
- name: Include OS-specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_facts.os_family | lower }}_{{ ansible_facts.distribution_major_version }}.yml"
- "{{ ansible_facts.os_family | lower }}.yml"
ignore_errors: true

- name: auth | Install auth pre-reqs (Debian)
become: yes
apt:
name:
- python-passlib
- apache2-utils
- "{{ passlib }}"
state: present
register: _task
retries: 5
delay: 3
until: _task is succeeded
when: ansible_facts.os_family == 'Debian'

- name: Include RedHat OS-specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_os_family | lower }}_{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_os_family | lower }}.yml"
ignore_errors: true
when: ansible_facts.os_family == 'RedHat'

- name: auth | Install auth pre-reqs (RedHat)
become: yes
yum:
Expand Down
5 changes: 0 additions & 5 deletions roles/StackStorm.st2/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
- name: Ensure python3.6 is available
include_tasks: request_ppa.yml
when: ansible_facts.os_family == 'Debian' and ansible_facts.distribution_major_version == '16'
tags: st2

- name: Verify python3-devel is available in enabled repo
become: yes
shell:
Expand Down
38 changes: 0 additions & 38 deletions roles/StackStorm.st2/tasks/request_ppa.yml

This file was deleted.

3 changes: 3 additions & 0 deletions roles/StackStorm.st2/vars/debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# List of python variables
---
passlib: python-passlib
3 changes: 3 additions & 0 deletions roles/StackStorm.st2/vars/debian_20.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# List of python3 variables
---
passlib: python3-passlib
2 changes: 1 addition & 1 deletion roles/StackStorm.st2chatops/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down
2 changes: 1 addition & 1 deletion roles/StackStorm.st2repo/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down
27 changes: 27 additions & 0 deletions roles/StackStorm.st2smoketests/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
galaxy_info:
description: Run StackStorm smoketests to verify the setup
author: armab
company: StackStorm
license: Apache 2.0
min_ansible_version: 2.5
platforms:
- name: Ubuntu
versions:
- bionic
- focal
- name: EL
versions:
- 7
- 8
galaxy_tags:
- system
- stackstorm
- st2
- automation
- remediation
- devops
dependencies:
- role: StackStorm.epel
when: ansible_facts.os_family == 'RedHat'
- role: StackStorm.st2repo
2 changes: 1 addition & 1 deletion roles/StackStorm.st2web/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
- name: EL
versions:
- 7
Expand Down