Skip to content

Commit

Permalink
Merge branch 'master' into add-san-for-self-signed-certs
Browse files Browse the repository at this point in the history
  • Loading branch information
arm4b authored Jan 4, 2022
2 parents 090ff0b + eb38c44 commit 5a6bf68
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ jobs:
bundle install --jobs $(nproc) --retry 3
- name: Test
run: |
echo "Run the Smoke Tests"
# Use a dummy test org for forked PRs
true && `base64 --decode <<< ZXhwb3J0IEhVQk9UX1NMQUNLX1RPS0VOPXhveGItMTc2OTM1OTkzNDE0LWltdFNJRktPYXkxVlFFTWtUdVJWYmh0bAo=`
bundle exec kitchen test ${{matrix.distro}} --debug ${{ matrix.name }}
env:
HUBOT_SLACK_TOKEN: ${{ secrets.HUBOT_SLACK_TOKEN }}
slack-notification:
name: Slack notification for failed master builds
Expand Down
40 changes: 27 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Ansible-st2

Ansible playbooks to deploy [StackStorm](https://github.com/stackstorm/st2).
> [StackStorm](http://stackstorm.com/) is event-driven automation platform written in Python.
With over [50+ integrations](https://github.com/StackStorm/st2contrib/tree/master/packs) like GitHub, Docker, Nagios, NewRelic, AWS, Ansible it allows you to wire together your existing infrastructure into complex Workflows with auto-remediation and many more.
Aka IFTTT orchestration for Ops.

> [StackStorm](http://stackstorm.com/) is event-driven automation platform written in Python. With over [50+ integrations](https://github.com/StackStorm/st2contrib/tree/master/packs) like GitHub, Docker, Nagios, NewRelic, AWS, Ansible it allows you to wire together your existing infrastructure into complex Workflows with auto-remediation and many more. Aka IFTTT orchestration for Ops.
[![Build Status](https://github.com/StackStorm/ansible-st2/actions/workflows/build.yaml/badge.svg)](https://github.com/StackStorm/ansible-st2/actions/workflows/build.yaml)
[![Repository deb/rpm](https://img.shields.io/badge/Repository-deb/rpm-blue.svg)](https://packagecloud.io/StackStorm/stable/)
[![Join our community Slack](https://stackstorm-community.herokuapp.com/badge.svg)](https://stackstorm.com/community-signup)

## Supported platforms

* Ubuntu Bionic (18.04)
* Ubuntu Focal (20.04)
* RHEL7 / CentOS7
Expand All @@ -20,15 +20,18 @@ 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, Redis and nginx.

## Installation

```sh
# stackstorm
ansible-playbook stackstorm.yml
```

## Variables

Below is the list of variables you can redefine in your playbook to customize st2 deployment:

| Variable | Default | Description |
Expand Down Expand Up @@ -65,23 +68,26 @@ Below is the list of variables you can redefine in your playbook to customize st
| `st2chatops_version` | `latest` | st2chatops version to install. Use `latest` to get automatic updates or pin it to numeric version like `2.2.0`.

## Examples

Install latest `stable` StackStorm with all its components on local machine:

```sh
ansible-playbook stackstorm.yml -i 'localhost,' --connection=local
```

> Note that keeping `latest` version is useful to update StackStorm by re-running playbook, since it will reinstall st2 if there is new version available.
This is default behavior. If you don't want updates - consider pinning version-revision numbers.

Install specific numeric version of st2 with pinned revision number as well:

```sh
ansible-playbook stackstorm.yml --extra-vars='st2_version=2.2.0 st2_revision=8'
```

## Installing behind a proxy.
## Installing behind a proxy

If you are installing from behind a proxy, you can use environment variables `http_proxy`, `https_proxy`, and `no_proxy` in the playbook. For the
st2smoketests, you will need to disable proxy for localhost.
If you are installing from behind a proxy, you can use environment variables `http_proxy`, `https_proxy`, and `no_proxy` in the playbook. For the st2smoketests, you will need to disable proxy for localhost.

```yaml
environment:
Expand All @@ -91,32 +97,38 @@ st2smoketests, you will need to disable proxy for localhost.
```
## Developing
There are a few requirements when developing on `ansible-st2`.

These are the platforms we must support (must pass end-to-end testing):
- Ubuntu Bionic
- Ubuntu Focal
- CentOS7
- CentOS8
- RHEL7 (via AWS)
- RHEL8 (via AWS)

* Ubuntu Bionic
* Ubuntu Focal
* CentOS7
* CentOS8
* RHEL7 (via AWS)
* RHEL8 (via AWS)

Must also support Ansible Idempotence (Eg. Ansible-playbook re-run should end with the following results: `changed=0.*failed=0`)

For development purposes there is [Vagrantfile](Vagrantfile) available. The following command will setup ubuntu18 box (`ubuntu/bionic64`) by default:

```sh
vagrant up
```

Other distros:

```sh
vagrant up ubuntu20
vagrant up centos7
vagrant up centos8
```

## Other Installers

You might be interested in other methods to deploy StackStorm engine:

* Configuration Management
* [Puppet Module](https://github.com/stackstorm/puppet-st2)

Expand All @@ -127,7 +139,9 @@ You might be interested in other methods to deploy StackStorm engine:
* [RHEL7/CentOS7](https://docs.stackstorm.com/install/rhel7.html)

## Help
If you're in stuck, our community always ready to help, feel free to:

If you are stuck, our community is always ready to help, feel free to:

* Ask questions in our [public Slack channel](https://stackstorm.com/community-signup)
* [Report bug](https://github.com/StackStorm/ansible-st2/issues), provide [feature request](https://github.com/StackStorm/ansible-st2/pulls) or just give us a ✮ star

Expand Down
13 changes: 13 additions & 0 deletions roles/StackStorm.mongodb/tasks/mongodb_debian.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
---
# gpg is required for apt_key and may be missing in some minimal installations
- name: apt | Install gpg
become: yes
apt:
name: gpg
state: present
update_cache: yes
cache_valid_time: 3600
register: _task
retries: 5
delay: 3
until: _task is succeeded

- name: apt | Add mongodb key
become: yes
apt_key:
Expand Down
2 changes: 1 addition & 1 deletion roles/StackStorm.st2/tasks/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Injecting 'st2_services' var in the middle of play verified to work with 'restart st2' handler as handlers flushed as last step
- name: Redefine list of services based on st2 version
set_fact:
st2_services: "{{ st2_services }} + {{ item.1 }}"
st2_services: "{{ st2_services + item.1 }}"
# dict2items not available until 2.6, so use Jinja's dictsort instead
loop: "{{ st2_services_versioned | dictsort }}"
when: item.0 is version_compare(st2_version_installed, '<=')

0 comments on commit 5a6bf68

Please sign in to comment.