-
-
Notifications
You must be signed in to change notification settings - Fork 173
WIP: RHEL 8/CentOS 8 docs #955
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
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e01942b
first EL8 docs
punkrokk 72824e0
Merge branch 'master' into EL8_docs
punkrokk 1a0c021
el8 mongo url updates
punkrokk 98ff3d7
Merge branch 'EL8_docs' of https://github.com/StackStorm/st2docs into…
punkrokk fa1d3fa
more EL8 updates
punkrokk f06ce27
Update index.rst
punkrokk b2499f0
build fixes
punkrokk b955264
build fixes
punkrokk cbf393e
Merge branch 'master' into EL8_docs
punkrokk ec7631a
update sys reqs
punkrokk a634847
reorder some stuff
punkrokk 58e51a2
remove blank line
punkrokk 086a2c2
Merge branch 'master' into EL8_docs
punkrokk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,287 @@ | ||
| RHEL 8/CentOS 8 | ||
| =============== | ||
|
|
||
| .. include:: common/intro.rst | ||
|
|
||
| .. contents:: Contents | ||
| :local: | ||
|
|
||
| System Requirements | ||
| ------------------- | ||
|
|
||
| Please check the :doc:`supported versions and system requirements <system_requirements>`. | ||
|
|
||
| .. note:: | ||
|
|
||
| |st2| on RHEL 8/CentOS 8 runs all services, actions and sensors using Python 3**only**. It | ||
| does not support Python2 actions. `More info about python in RHEL 8 and CentOS 8. | ||
| <https://developers.redhat.com/blog/2019/05/07/what-no-python-in-red-hat-enterprise-linux-8/>`_ | ||
|
|
||
| Mistral is not supported on RHEL 8/CentOS 8. All workflows must be written in | ||
| :doc:`Orquesta </orquesta/index>`. | ||
|
|
||
| Minimal Installation | ||
| -------------------- | ||
|
|
||
| Adjust SELinux Policies | ||
| ~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| If your system has SELinux in Enforcing mode, please follow these instructions to adjust SELinux | ||
| policies. This is needed for successful installation. If you are not happy with these policies, | ||
| you may want to tweak them according to your security practices. | ||
|
|
||
| * First check if SELinux is in Enforcing mode: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| getenforce | ||
|
|
||
| * If the previous command returns 'Enforcing', then run the following commands: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # SELINUX management tools, not available for some minimal installations | ||
| sudo yum install -y policycoreutils-python | ||
|
|
||
| # Allow network access for nginx | ||
| sudo setsebool -P httpd_can_network_connect 1 | ||
|
|
||
| # Allow RabbitMQ to use port '25672', otherwise it will fail to start | ||
| sudo semanage port --list | grep -q 25672 || sudo semanage port -a -t amqp_port_t -p tcp 25672 | ||
|
|
||
| .. note:: | ||
|
|
||
| If you see messages like "SELinux: Could not downgrade policy file", it means you are trying to | ||
| adjust policy configurations when SELinux is disabled. You can ignore this error. | ||
|
|
||
| Install Dependencies | ||
| ~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. include:: __mongodb_note.rst | ||
|
|
||
| Install MongoDB, RabbitMQ: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | ||
|
|
||
| # Add key and repo for the latest stable MongoDB (4.0) | ||
| sudo rpm --import https://www.mongodb.org/static/pgp/server-4.0.asc | ||
| sudo sh -c "cat <<EOT > /etc/yum.repos.d/mongodb-org-4.repo | ||
| [mongodb-org-4] | ||
| name=MongoDB Repository | ||
| baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.0/x86_64/ | ||
| gpgcheck=1 | ||
| enabled=1 | ||
| gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc | ||
| EOT" | ||
|
|
||
| sudo yum -y install crudini | ||
| sudo yum -y install mongodb-org | ||
| sudo yum -y install rabbitmq-server | ||
| sudo systemctl start mongod rabbitmq-server | ||
| sudo systemctl enable mongod rabbitmq-server | ||
|
|
||
|
|
||
| Setup Repositories | ||
| ~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The following script will detect your platform and architecture and setup the appropriate |st2| | ||
| repository. It will also add the the GPG key used for package signing. | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| curl -s https://packagecloud.io/install/repositories/StackStorm/stable/script.rpm.sh | sudo bash | ||
|
|
||
| Install |st2| Components | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| sudo yum install -y st2 | ||
|
|
||
| .. include:: common/configure_components.rst | ||
|
|
||
| Setup Datastore Encryption | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. include:: common/datastore_crypto_key.rst | ||
|
|
||
| Configure SSH and SUDO | ||
| ~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. include:: common/configure_ssh_and_sudo.rst | ||
|
|
||
| Start Services | ||
| ~~~~~~~~~~~~~~ | ||
|
|
||
| .. include:: common/start_services.rst | ||
|
|
||
| Verify | ||
| ~~~~~~ | ||
|
|
||
| .. include:: common/verify.rst | ||
|
|
||
| Configure Authentication | ||
| ------------------------ | ||
|
|
||
| The reference deployment uses a file-based authentication provider for simplicity. Refer to | ||
| :doc:`/authentication` to configure and use PAM or LDAP authentication backends. | ||
|
|
||
| To set up authentication with file-based provider: | ||
|
|
||
| * Create a user with a password: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # Install htpasswd utility if you don't have it | ||
| sudo yum -y install httpd-tools | ||
| # Create a user record in a password file. | ||
| echo 'Ch@ngeMe' | sudo htpasswd -i /etc/st2/htpasswd st2admin | ||
|
|
||
| .. include:: common/configure_authentication.rst | ||
|
|
||
| Install WebUI and Setup SSL Termination | ||
| --------------------------------------- | ||
|
|
||
| `NGINX <http://nginx.org/>`_ is used to serve WebUI static files, redirect HTTP to HTTPS, provide | ||
| SSL termination, and reverse-proxy st2auth and st2api API endpoints. To set it up: install the | ||
| ``st2web`` and ``nginx`` packages, generate certificates or place your existing certificates under | ||
| ``/etc/ssl/st2``, and configure nginx with |st2|'s supplied :github_st2:`site config file st2.conf | ||
| <conf/nginx/st2.conf>`. | ||
|
|
||
| |st2| depends on Nginx version >=1.7.5. RHEL has an older version in the package repositories, so | ||
| you will need to add the official Nginx repository: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # Add key and repo for the latest stable nginx | ||
| sudo rpm --import http://nginx.org/keys/nginx_signing.key | ||
| sudo sh -c "cat <<EOT > /etc/yum.repos.d/nginx.repo | ||
| [nginx] | ||
| name=nginx repo | ||
| baseurl=http://nginx.org/packages/rhel/\\\$releasever/x86_64/ | ||
| gpgcheck=1 | ||
| enabled=1 | ||
| EOT" | ||
|
|
||
| # Ensure that EPEL repo is not used for nginx | ||
| sudo sed -i 's/^\(enabled=1\)$/exclude=nginx\n\1/g' /etc/yum.repos.d/epel.repo | ||
|
|
||
| # Install nginx | ||
| sudo yum install -y nginx | ||
|
|
||
| # Install st2web | ||
| sudo yum install -y st2web | ||
|
|
||
| # Generate a self-signed certificate or place your existing certificate under /etc/ssl/st2 | ||
| sudo mkdir -p /etc/ssl/st2 | ||
| sudo openssl req -x509 -newkey rsa:2048 -keyout /etc/ssl/st2/st2.key -out /etc/ssl/st2/st2.crt \ | ||
| -days 365 -nodes -subj "/C=US/ST=California/L=Palo Alto/O=StackStorm/OU=Information \ | ||
| Technology/CN=$(hostname)" | ||
|
|
||
| # Copy and enable the supplied nginx config file | ||
| sudo cp /usr/share/doc/st2/conf/nginx/st2.conf /etc/nginx/conf.d/ | ||
|
|
||
| # Disable default_server configuration in existing /etc/nginx/nginx.conf | ||
| sudo sed -i 's/default_server//g' /etc/nginx/nginx.conf | ||
punkrokk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| sudo systemctl restart nginx | ||
| sudo systemctl enable nginx | ||
|
|
||
| If you modify ports, or url paths in the nginx configuration, make the corresponding changes in | ||
| the st2web configuration at ``/opt/stackstorm/static/webui/config.js``. | ||
|
|
||
| Use your browser to connect to ``https://${ST2_HOSTNAME}`` and login to the WebUI. | ||
|
|
||
| .. _ref-rhel8-firewall: | ||
|
|
||
| If you are unable to connect to the web browser, you may need to change the default firewall | ||
| settings. You can do this with these commands: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| firewall-cmd --zone=public --add-service=http --add-service=https | ||
| firewall-cmd --zone=public --permanent --add-service=http --add-service=https | ||
|
|
||
| This will allow inbound HTTP (port 80) and HTTPS (port 443) traffic, and make those changes | ||
| survive reboot. | ||
|
|
||
| .. include:: common/api_access.rst | ||
|
|
||
| Setup ChatOps | ||
| ------------- | ||
|
|
||
| If you already run a Hubot instance, you can install the `hubot-stackstorm plugin | ||
| <https://github.com/StackStorm/hubot-stackstorm>`_ and configure |st2| environment variables, as | ||
| described below. Otherwise, the easiest way to enable :doc:`StackStorm ChatOps </chatops/index>` | ||
| is to use the `st2chatops <https://github.com/stackstorm/st2chatops/>`_ package. | ||
|
|
||
| * Validate that the ``chatops`` pack is installed, and a notification rule is enabled: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # Ensure chatops pack is in place | ||
| ls /opt/stackstorm/packs/chatops | ||
| # Create notification rule if not yet enabled | ||
| st2 rule get chatops.notify || st2 rule create /opt/stackstorm/packs/chatops/rules/notify_hubot.yaml | ||
|
|
||
| * Add `NodeJS v10 repository <https://nodejs.org/en/download/package-manager/>`_: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash - | ||
|
|
||
| * Install the ``st2chatops`` package: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| sudo yum install -y st2chatops | ||
|
|
||
| .. include:: common/configure_chatops.rst | ||
|
|
||
| * Start the service: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| sudo systemctl start st2chatops | ||
|
|
||
| # Start st2chatops on boot | ||
| sudo systemctl enable st2chatops | ||
|
|
||
| * Reload st2 packs to make sure the ``chatops.notify`` rule is registered: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| sudo st2ctl reload --register-all | ||
|
|
||
| * That's it! Go to your Chat room and begin ChatOps-ing. Read more in the :doc:`/chatops/index` section. | ||
|
|
||
| A Note on Security | ||
| ------------------ | ||
|
|
||
| .. include:: common/security_notes.rst | ||
|
|
||
| Upgrade to |ewc| | ||
| ---------------- | ||
|
|
||
| .. include:: common/ewc_intro.rst | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # Set up Extreme Workflow Composer repository access, install Enterprise packages and configure RBAC | ||
| curl -sSL -O https://stackstorm.com/ewc/install.sh && chmod +x install.sh | ||
| ./install.sh --user=st2admin --password='Ch@ngeMe' --license=${EWC_LICENSE_KEY} | ||
|
|
||
| .. rubric:: What's Next? | ||
|
|
||
| * Check out the :doc:`/start` Guide to build a simple automation. | ||
| * Get more actions, triggers, rules: | ||
|
|
||
|
|
||
| * Install integration packs from `StackStorm Exchange <https://exchange.stackstorm.org>`__ - follow the :doc:`/packs` guide. | ||
| * :ref:`Convert your scripts into StackStorm actions. <ref-actions-converting-scripts>` | ||
| * Learn how to :ref:`write custom actions <ref-actions-writing-custom>`. | ||
|
|
||
| * Use workflows to stitch actions into higher level automations - :doc:`/workflows`. | ||
| * Check out `tutorials on stackstorm.com <https://stackstorm.com/category/tutorials/>`__ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.