Skip to content

Installing a production environment

Nikola Vitanović edited this page Jul 18, 2019 · 12 revisions

Installing a production environment

This guide is your starting point for performing a complete production installation of Atomia.

Deploy the installation GUI

The deployment of the installation GUI should be done on a server running CentOS 7. Alternativieley Ubuntu 14.04 but support for this has been deprecated.

Please note that this server will host both the GUI and the Puppet master for the environment, hence you should give it a decent amount of processing power and disk space.

Note: it is imperative that result of hostname -f executed on puppetmaster machine is fqdn, and that /etc/hosts file contain valid fqdn record with puppetmasters management network ip.

System requirements

  • CPU: 2 vCPU
  • RAM: 2GB
  • HDD: 20GB
  • OS: CentOS 7 / Ubuntu 14.04

CentOS 7

To start the installation make sure you have set a valid FQDN to the server on which you are trying to install puppet. Recommendation for the naming would be puppet.example.com where you could replace example.com with your domain.

As root user run the following:

bash <(curl -s https://raw.githubusercontent.com/atomia/puppetmaster-gui/master/install-rhel7.sh)

When the installation is done you can check the service status:

service puppetmaster-gui status

It should show something like the following:

[root@puppet ~]# service puppetmaster-gui status
Redirecting to /bin/systemctl status puppetmaster-gui.service
● puppetmaster-gui.service - Puppetmaster-gui a gui client for deploying Atomia
   Loaded: loaded (/usr/lib/systemd/system/puppetmaster-gui.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-07-18 11:15:33 CEST; 1s ago
 Main PID: 8658 (node)
   CGroup: /system.slice/puppetmaster-gui.service
           └─8658 /usr/bin/node /opt/puppetmaster-gui/app/app.js

Jul 18 11:15:33 puppet.atomia.ru systemd[1]: Started Puppetmaster-gui a gui client for deploying Atomia.
Jul 18 11:15:33 puppet.atomia.ru systemd[1]: Starting Puppetmaster-gui a gui client for deploying Atomia...
Jul 18 11:15:34 puppet.atomia.ru node[8658]: Socket.IO listening on port 3000

Ubuntu 14.04 (Deprecated)

The deployment is currently done by executing a script provided with this repository:

wget https://raw.githubusercontent.com/atomia/puppetmaster-gui/master/install.sh && chmod +x install.sh
./install.sh

Overview of the installation GUI

Now proceed to the access the GUI at the servers ip address on port 3000.

This is the main page on which you can choose which kind of setup do you want. It's recommended to use the default and press the NEXT STEP button.

Now we need to setup puppet master on the local server. It's done automatically by the installer you just need to press the button START PROVISINONING. After this step a new window will pop up which will install the puppet master. Depending on multiple factors the installation can take up to 15 minutes, so be patient and don't close the page.

When you see the green bar installation of a puppet master is done, and you are ready to add and provision other servers.

Before you click on proceed to next task link make sure that everything is up and running, you can log in to the server and check for listening TCP ports.

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1865/mysqld
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      996/sshd
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      2440/postgres
tcp6       0      0 :::8140                 :::*                    LISTEN      5364/java
tcp6       0      0 :::8080                 :::*                    LISTEN      5343/java
tcp6       0      0 :::8081                 :::*                    LISTEN      5343/java
tcp6       0      0 :::22                   :::*                    LISTEN      996/sshd
tcp6       0      0 ::1:5432                :::*                    LISTEN      2440/postgres
tcp6       0      0 :::3000                 :::*                    LISTEN      1981/node

If everything matches continue to the next step. The next step would be setting up SSH keys if you use them for logging in the servers. If not just continue to the next step.

Fill the empty fields with desired values. Make sure that puppet_ip matches the local IP of the puppet master server that is on the network through which other servers will access it (the current server that you are installing this on). Make sure to save the configuration.

After this, you can continue to provision the servers in the order that we have or you can just click on the TASKS link from the menu which will show all the roles that servers can be provisioned into.

The installation is done by following a predefined number of steps, each step will deploy a server or prompt you for setting configuration variables.

Setting up the servers for your new environment

The pre requirements are listed in the pre requirement page of the GUI application that you just installed. In bullet form what you need is.

  • Create the required servers, you can do this at the start or as you go whichever you prefer
  • Decide what domain name you want for your Atomia applications and order a wildcard SSL certificate if you do not have one already

How to install a server

Each server is installed in a similar way by following a few simple steps described in this section.

Each server is assigned a separate role which is configured by clicking on the current task in the "Installation tasks" box or by choosing the role in the "List all tasks" menu item.

Add server

  1. Shows the current task to perform, the installation should be performed in a linear fashion.
  2. Shows the recommended firewall configuration that should be carried out prior to installation.
  3. Enter the server information, you may choose to use a password or an SSH key which is added in a previous step.
  4. When all is filled in correctly press the validate button which will perform some basic checks to make sure your server is reachable from the Puppet master (we strongly recommend that you add records in /etc/hosts file if your servers are not publicly resolvable).

When the server has passed validation you are able to add and modify configuration variables needed for the software to be installed correctly.

Configure server

  1. The basic configuration is always required to be filled in
  2. Clicking this button will reveal the advanced configuration which contains additional (non required) variables that can be modified. It is recommended to always check the advanced configuration.
  3. When everything is filled in clicking the "bootstrap" button will install and configure puppet agent and give the server the configured role.

Bootstrapping done

When the bootstrapping action has finished you will be presented with an "Ok" message as above. If not check for error messages and retry.

When bootstrapping has finished successfully a first puppet run will be done. Please note that on some roles this might take a few minutes, you can reload the page until the result of the provisioning is shown

Provisioning results

  1. The "Provision now" button will immediately start a new provisioning run and show the result. This is useful in order to retry a failed provisioning run or to execute an updated configuration if you changed any configuration variables.
  2. Shows a list of all the provisioning steps done in the most recent run, errors will be marked in red. If you want the raw output from the server logs you can press the "show raw output" link.
  3. When you are certain that provisioning has finished sucessfully (no errors are shown) you can proceed with the next step