-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Ubuntu 20.04 (focal) documentation.
- Loading branch information
Showing
7 changed files
with
222 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,209 @@ | ||
Ubuntu Focal (20.04) | ||
===================== | ||
|
||
.. include:: common/intro.rst | ||
|
||
.. contents:: Contents | ||
:local: | ||
|
||
.. note:: | ||
|
||
|st2| on Ubuntu ``20.04`` runs all services, actions and sensors using Python 3. | ||
|
||
System Requirements | ||
------------------- | ||
|
||
Please check the :doc:`supported versions and system requirements <system_requirements>`. | ||
|
||
Minimal Installation | ||
-------------------- | ||
|
||
Install Dependencies | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Install MongoDB, and RabbitMQ: | ||
|
||
.. code-block:: bash | ||
sudo apt-get update | ||
sudo apt-get install -y curl | ||
# Add key and repo for MongoDB (4.4) | ||
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - | ||
sudo sh -c "cat <<EOT > /etc/apt/sources.list.d/mongodb-org-4.4.list | ||
deb http://repo.mongodb.org/apt/ubuntu $(lsb_release -c | awk '{print $2}')/mongodb-org/4.4 multiverse | ||
EOT" | ||
sudo apt-get update | ||
sudo apt-get install -y crudini | ||
sudo apt-get install -y mongodb-org | ||
sudo apt-get install -y rabbitmq-server | ||
For Ubuntu ``Focal`` you may need to enable and start MongoDB. | ||
|
||
.. code-block:: bash | ||
sudo systemctl enable mongod | ||
sudo systemctl start mongod | ||
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.deb.sh | sudo bash | ||
Install |st2| Components | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: bash | ||
sudo apt-get 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 apt-get install -y apache2-utils | ||
# 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>`. | ||
|
||
.. code-block:: bash | ||
# Install st2web and nginx | ||
sudo apt-get install -y st2web nginx | ||
# Generate 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 XXX -nodes -subj "/C=US/ST=California/L=Palo Alto/O=StackStorm/OU=Information \ | ||
Technology/CN=$(hostname)" | ||
# Remove default site, if present | ||
sudo rm /etc/nginx/conf.d/default.conf | ||
# Check for a default site on sites-enabled to avoid a duplicate default server error | ||
sudo rm -f /etc/nginx/sites-enabled/default | ||
# Copy and enable the supplied nginx config file | ||
sudo cp /usr/share/doc/st2/conf/nginx/st2.conf /etc/nginx/conf.d/ | ||
sudo service nginx restart | ||
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. | ||
|
||
.. 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://deb.nodesource.com/setup_10.x | sudo -E bash - | ||
* Install the ``st2chatops`` package: | ||
|
||
.. code-block:: bash | ||
sudo apt-get install -y st2chatops | ||
.. include:: common/configure_chatops.rst | ||
|
||
* Start the service: | ||
|
||
.. code-block:: bash | ||
sudo service st2chatops start | ||
* Reload st2 packs to make sure ``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 | ||
|
||
.. 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 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 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