Setup: Create - HolgerHees/smartserver GitHub Wiki

Create your own setup

The demo setup is prepared to be used with vagrant.

To start your own setup, copy the folder ./config/demo/ to ./config/<myserver> where <myserver> is the name of your new setup.

Make the following mandatory changes to your new setup.

  1. In the file ./config/<myserver>/server.ini, modify only the first word from demo to <myserver> like
<myserver> ansible_connection=local ansible_user=root ansible_host=127.0.0.1 ansible_pipelining=true

If you want to deploy a remote machine, you have to modify the ip to your production ip and the connection type too ssh like

<myserver> ansible_connection=ssh ansible_user=root ansible_host=<myproductionip> ansible_pipelining=true
  1. Setup your network in the file ./config/<myserver>/env.yml

    1. the domain name server_domain like smartserver.test
    2. the ip address production_ip for your production environment
    3. the ip address staging_ip for your staging environment or leave it empty, because it is optional. Different IP configurations for your staging (test) and production environment are needed to detect if we are running on production or not.
  2. Change config/demo/roles/apache_proxy to config/<myserver>/roles/apache_proxy in the file ./config/<myserver>/roles.yml

Additionally you can comment out any line inside the file ./config/<myserver>/roles.yml. They are examples of the demo setup and show how include or add additional features.

Now you should have two folders inside ./config. First, the original ./config/demo folder and secondly the new ./config/<myserver> folder.

Deploy on your production server

To run a local deployment directly on your production server you have to clone the smartserver git project there too and copy your ./config/<myserver> folder to your production machine. After that please follow how to deploy with ansible.

Alternative you can also start a remote deployment. This is not recommended, because it is much slower.

Deploy inside a virtual machine using vagrant

Deploying your setup works only if you specify a staging ip and if the connection type is local.

To deploy a staging setup inside a virtual machine, run:

vagrant --config=<myserver> --os=suse up

If you want to use almalinux (rhel) run:

vagrant --config=<myserver> --os=alma up

If you want to use ubuntu run:

vagrant --config=<myserver> --os=ubuntu up
⚠️ **GitHub.com Fallback** ⚠️