clouder documentation - read the docs · once installed using clouder is easy, but set up all the...

52
Clouder Documentation Release 1.0 Yannick Buron July 18, 2016

Upload: others

Post on 20-May-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder DocumentationRelease 1.0

Yannick Buron

July 18, 2016

Page 2: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two
Page 3: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Contents

1 Getting Started 31.1 Odoo installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Clouder configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 The registry container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Build the images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.5 Deploy containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.6 Build the application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.7 Deploy the service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131.8 Configure the domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131.9 Add the base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2 Connect to a new server 17

3 Images 21

4 Applications 254.1 Application Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.2 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5 Containers 31

6 Services 35

7 Domains and Bases 397.1 Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.2 Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

8 Backups and Configuration 458.1 Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

i

Page 4: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

ii

Page 5: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Contents:

Contents 1

Page 6: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

2 Contents

Page 7: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

CHAPTER 1

Getting Started

In this chapter, we’ll see a step by step guide to install a ready-to-use infrastructure. For the example, the base wewill create will be another Clouder.Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial cantake around two hours.

1.1 Odoo installation

This guide will not cover the Odoo installation in itself, we suggest you read the installation documentation on theofficial website.You can also contact us on www.goclouder.net to ask for a free instance, it may be easier for you because youobviously can’t install your Clouder on a server managed by this same Clouder.Due to the extensive use of ssh, Clouder is only compatible with Linux and has only be tested on a Debiandistribution.

Once your Odoo installation is ready, download the Clouder modules on Github and add them in your addons directory,then install the clouder module and clouder_template_odoo (this module will install a lot of template dependencies,like postgres, postfix etc...).

3

Page 8: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

1.2 Clouder configuration

The first thing to do is to set the sysadmin email in the Clouder configuration.

Then you have to configure the server you want to connect. See the how to connect a server chapter for more explana-tion.

1.3 The registry container

The next thing to do is to generate the images for each applications we’ll need, but for this we need a registry containerto store theses images.

First, go in the img_registry in the Images menu.

4 Chapter 1. Getting Started

Page 9: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

And click on the Build button to generate a new version.

Then go on the container menu and create a new registry container.

When you save it, the registry image will be downloaded, build and deployed as a new container. Like all actions inClouder, you can read the log to understand which commands was executed.

1.3. The registry container 5

Page 10: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

The logs are also visible in the default Odoo output.

1.4 Build the images

Now that we have the registry, we can build the images.

First we need to build the base image, which will be used by all the others. This image update the debian package,install cron and supervisor and some useful packages.

Select the registry container, and click on the Build button to generate it.

Then you can generate the others images. For this tutorial, we’ll need theses ones :

• img_archive

• img_backup_bup

• img_backup_upload

• img_nginx

6 Chapter 1. Getting Started

Page 11: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

• img_bind

• img_postfix

• img_shinken

• img_postgres

• img_odoo

For each, select the registry container and the version of the base image you want to use, then build it. Some of themwill take time, especially shinken which may take around twenty minutes to generate.

See the Image chapter for more informations about the fields in the image form.

1.5 Deploy containers

The first containers we’ll need to deploy will be the archive, backup and backup-upload containers because theses arecontainers used by Clouder (like the registry one).

First generate the archive and backup-upload containers (because they are containers without link). Note that backup-upload container shall be in a distant server to protect your backups, but for this tutorial you can let it in the sameserver.

1.5. Deploy containers 7

Page 12: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Then, create the backup container. This one require a link to the backup-upload to know where the backup shall beexported.

8 Chapter 1. Getting Started

Page 13: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Now that the system containers are created, we can generate the containers for the subcomponents needed for hostingOdoo. For each, think about adding the backup container in the save tab.

Postfix for sending and receiving emails. You shall use an smtp provider to make sure your emails are send (mandrillis already configured, just indicate your email and api in the container options).You have to map the port 25 of your server to the port 25 of your postfix container to receive emails.

Bind for resolving domain names. You have to map the port 53 of your server to the port 53 of your Bind container.

1.5. Deploy containers 9

Page 14: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Shinken for monitoring. If something goes wrong on your infrastructure an email will be send to the sysadmin email.

Are monitored :

-The server cpu/RAM/disk space.

-If all the containers are accessible through ssh.

-If all bases are accessible at their url.

-If all containers and bases were backuped today.

You have to specify the postfix container which will send the emails.

Proxy for redirecting each url to the correct container.You have to map the ports 80 and 443 of your server to the port 80 and 443 of your proxy container.

10 Chapter 1. Getting Started

Page 15: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Postgres for managing your databases.

Finally, you can deploy your Odoo container. Indicate your postfix and postgres container in the links.

1.5. Deploy containers 11

Page 16: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

If you want to monitor ssh connexion and container backup, you can add shinken in the links and click on deploy. Youcan do it anytime, even after creating the container.

For more information about the container fields, you can read the Containers chapter.

1.6 Build the application

Next, you need to go on the Clouder application in the Applications menu.

Indicate the archive container and click on the build button. This will download the Odoo files and the Cloudermodules.

For more information about the application fields, you can read the Applications chapter.

12 Chapter 1. Getting Started

Page 17: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

1.7 Deploy the service

Now that we have the application, we can deploy it in our Odoo container.

Don’t forget to indicate the postgres container in the link.For more information about the service fields, you can read the Services chapter.

1.8 Configure the domain

Before we can add our base, we need to add the domain in your Clouder.

Configure your domain at your domain provider to use your server as the DNS server (take care, the change may takedays to propagate). This is optional, you can continue to use the DNS of your provider but in this case you’ll have toadd manually the record each time you create a base in your Clouder.

For more information about the domain fields, you can read the Domains and Bases chapter.

1.7. Deploy the service 13

Page 18: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

1.9 Add the base

Finally, we can configure the base.

Don’t forget to configure the bind/shinken/proxy/postfix links and the backup container. The database will be auto-matically created, your Clouder will be configured and the proxy will redirect the url to your Odoo container.

For more information about the base fields, you can read the Domains and Bases chapter.

Go to your shinken instance to see the health of your infrastructure in real time (Default login : admin / admin)

14 Chapter 1. Getting Started

Page 19: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Congratulations! You can now easily create another base or deploy any other application you can find in theclouder_template_* modules, or even create your own images and applications.

If you need any assistance you can contact us for professional services or ask on the forum/mailing-list inwww.goclouder.net.If you want to report a bug or contribute, go to the github repository https://github.com/clouder-community/clouder.

1.9. Add the base 15

Page 20: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

16 Chapter 1. Getting Started

Page 21: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

CHAPTER 2

Connect to a new server

We will see in this chapter how we can configure the servers and connect them to your Clouder. Clouder is onlycompatible with Linux, and the Debian distribution is recommended.

First, if it’s not already done, you shall install openssh on your server and Docker.In Debian, you just have to execute these commands :

For ssh :

apt-get install openssh-server

For Docker :

echo deb http://get.docker.io/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.listsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9sudo apt-get updatesudo apt-get install -y lxc-docker

Then, you need to add the public key of your clouder in the /root/.ssh/authorized_keys file, so Clouder can connect tothe server. Root rights are needed for the docker commands.If you don’t have a public key or don’t know how to create one, a public key will be automatically generated whenyou register the server in your Clouder.

And that’s it. Now we can go to the Server menu in Clouder and create a new record.

17

Page 22: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Here the fields needed :

• The server domain name used to contact the server. You can only use here lowercase, digit, hyphen and dot.

• The server IP. You can only use here digit and dot.

• The ssh port to connect to the server.

• The supervision container which will monitor the server, if needed. The server will be added in the supervisorduring the creation of the record.

• The SSH private and public key to connect to the server. A couple of keys are automatically generated whenyou create a new record, but you can use your owns.

• The ports range for the containers which will be created in this server. When you create a container withoutspecifying an hostport, a new port from this range will be attributed to it.

• Check the public checkbox if you want all users of the Clouder to be able to use this server. Otherwise, a usercan only access a server if he is the manager of this server (or an administrator).

When you save the new record, the ssh key will be saved in the system hosting the Clouder so it can connect to thenew server, and if needed a new configuration file will be added to the supervision server. You can check the result ofthe command in the logs.

18 Chapter 2. Connect to a new server

Page 23: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Finally, you can use the reinstall button if you think the ssh key wasn’t correctly installed, or use restart/stop containersto restart/stop all containers in a server in one click.

19

Page 24: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

20 Chapter 2. Connect to a new server

Page 25: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

CHAPTER 3

Images

The Image menu is the place where you’ll manage the images of your containers. You need to build them before theycan be deployed in your containers.

When you build an image, a new image version will be created, so an image must contain all the information neededto build it. This include :

• The name of the image. You can only use here lowercase, digit and underscore.

• The current version of the image. This is used for the version name which will use the format ${cur-rent_version}.${current_datetime}.

• The parent image to use. We recommend building a base image containing the packages you need to launchyour process (like supervisor, cron, syslog etc. . . ) which you can then use as a parent for the other images.

• If the image is privileged, you shall not use this option unless really required because the container will be ableto access the host system. It can be useful in at least one case, if you want to build a container which host othercontainers (see clouder_template_docker for example).

• Check the public checkbox if you want all users of the Clouder to be able to use this image. Otherwise, a usercan only access an image if he is the manager of this image (or an administrator).

21

Page 26: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Then you have the Dockerfile field, used to know which commands shall be executed during the image building.Follow the Docker documentation https://docs.docker.com/reference/builder/ if you don’t know how to write it.

Note that the commands FROM (use parent field), MAINTENER (use the sysadmin email), VOLUME (use the vol-umes configuration) and EXPOSE (use the ports configuration) are automatically inserted in the Dockerfile during thebuilding process, so you don’t have to take care of them.

Then you have the volumes configuration. This is used both to indicate the volume of the container but also thedirectory to backup in the container. When you restore a container backup, all volumes will be erased and replacedby the backup, the rest of the container will be untouched. Also after the restore and if filled, the volume will bechown with the systemuser value to ensure rights are correctly attributed.You can also map a directory to a directory in the host system with the host path option. This is especially useful toget the archives of the application you want to host in the container, in this case you often want to check the readonlycheckbox to ensure the container can’t modify the directory in the host system.

Next you have the ports configuration, used to know the ports which need to be exposed to the outside of thecontainer, to the local network or to the whole Internet.In the container, one field will be added : the hostport which is the port to access the localport in the container fromoutside of the host system. It is automatically attributed within the port range of the server but you can also force aspecific port (Especially needed for the Bind, Proxy and Postfix applications which have to listen on ports 25, 53, 80and 443 of the host system)

Then, if you have a parent image, you have to select the parent version you want to use. Else you have to specify theFROM statement like you would use in a Dockerfile (example : debian:latest).You also have to specify the registry container where the image will be stored. For more information about this veryspecific kind of container, see the Getting Started chapter.

Finally, you can press the build button. This will create a new image version, named from the current date, and executethe commands to build it and store it in the registry.

22 Chapter 3. Images

Page 27: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

If you want to check the commands results, you can open the log in the version window.

Remember you can manage your own images, but you also can use the ready-to-use images from theclouder_template_* modules until you feel confident enough to create yours. In this case, you just have to pressthe build button.

23

Page 28: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

24 Chapter 3. Images

Page 29: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

CHAPTER 4

Applications

The Application represent the software you can host in your Clouder. In this chapter, we’ll see how we can configurethem.

4.1 Application Types

This menu contain the list of application type defined in your Clouder. They are mainly just a tag so the python codecan know which code shall be executed, depending of the type of the application.

Since it’s so deeply connected with the python code, you shall never create an application type through the graphicalinterface, it shall always be defined in a template module.

25

Page 30: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

It contains :

• The name of the type, can only contains lowercase, digit or hyphen.

• The system user which will run the applications.

• If a symbolic link shall be use by default. If this checkbox is set, the applications archives will not be downloadedinside a container, it will use a directory linked to an archive on the host system so a same archive can be sharedbetween several containers.

• The localpath where the archives are stored inside the containers, it shall be mapped to the directory where thearchives are stored in the host system.

• The localpath services where the services will be installed inside the container.

• Finally, if the application needs several databases (like seafile), you can indicate in the multiple databases fieldsthe name of the databases which need to be created.

In the application type you can also define the options. Options allow to manage configuration settings specifics to anapplication type, so you can manage some values needed for your python code without having to add new fields in theClouder interface.

An option can be assigned to applications, containers, services or bases. In the application type you’ll define thepossible options for each objects, and the values will be defined in the objects.

Each option has :

• The name of the option, can only contains lowercase, digit or underscore.

• The type of object where the value of the option will be defined.

• If the option shall be suggested when you create a new record in the designed object.

• If this option is required, if set to True you’ll not be able to create a new record if the option is not set.

• Finally, the default value for this option if needed.

4.2 Application

The application represent the software which will be hosted in your Clouder. You can have several applications foreach application types.

26 Chapter 4. Applications

Page 31: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

For example, for the application type odoo, you can have three applications:

• An Odoo application, which will just install a regular Odoo with only the base module.

• A Odoo verticalisation for Hotels, which will add the hotel modules from OCA(https://github.com/OCA/vertical-hotel) in the application archive and if you set the hotel module in theinstall_modules option will automatically install the hotel module when you create a new base.

• A Clouder application, to host Clouder for other peoples (Yeah!). Very similar to a verticalisation, it will addthe clouder modules in the application archive and auto install the clouder module thanks to the install_modulesoption.

Since the modules can be installed automatically when the base is deployed, this mean you can easily create yourown verticalisation with modules your developped or you like, and add a form on your website so your visitors willbe able to automatically get their own instances of your verticalisation.We took the example of Odoo, but it works with any software which have a module system, like Drupal, Wordpressetc. . . If you know a lot of very good modules and want to share this knowledge you can easily use Clouder to build apackage which your visitors can install in just a few click.

Let’s get back to the application form. For each application you can define :

• The application name, no restrictions here.

• The application code, can only contains lowercase, digit or hyphen. Note that since this code will be used ismany location in your infrastructure, you can’t change his value once defined.

• The application type of the application.

• The current version of the application. This is used for the version name which will use the format ${cur-rent_version}.${current_datetime}.

• The default image which shall be used for this application when we deploy a container.

• The next server to use for this application, if you create a new base without providing a service it will automati-cally deploy a new container in this server.

• The default admin name and email, theses options can be overridden in the base.

4.2. Application 27

Page 32: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

• Check the public checkbox if you want all users of the Clouder to be able to use this application. Otherwise, auser can only access an application if he is the manager of this application (or an administrator).

Next you have the options configuration, where you can define the values for the options specifics to this applicationtype.

Following, you have the links configuration. Theses are an extremely important concept, you can link an applicationto the others in order to build a coherent infrastructure.For example, an Odoo container by himself can’t work, you need at least to link it to a Postgres container so it canhave their databases. Same, you can link the Odoo container to a Postfix container for sending and receiving emails, aProxy container for redirecting the defaults ports to Odoo and adding the https, a Shinken container to make sure it’salways up and get stats, a Bind container to assign a domain name to the Odoo base, a Piwik to get analytic statsetc. . .When a link is deployed, some specific python code will be called and will make sure the other container know theexistence of this container and adapt his configuration.

Very similar to the options interface, links are configured in the application form and are defined in the contain-ers/services/bases. So for each link you can define :

• The application to link.

• If the link shall be suggested when you create a new record in the designed object.

• If this link is required, if set to True you’ll not be able to create a new record if the link is not set.

• If a direct docker link shall be made between the two containers. This improve security for the communicationsbetween the containers but require the containers to be in the same server.

• The type of object where this link shall be available (container/service/base)

• The next container which shall be used for this link. If filled, the link will be autocompleted in the con-tainer/service/base.

After the links, you have a text zone which shall contain the informations needed to build the application archive. Anarchive is a compressed directory containing the application files which will be stored in an archive container and willbe moved in the servers if a service on them need it.

28 Chapter 4. Applications

Page 33: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Very similar with managing the images, each archive correspond to an application version which is created when youclick on the build button and is named with his build date.

What you shall place in the text field depend of each application type. For example for Odoo, you can either indicatethe git branch to download (including the community modules you want to use) or a recipe. For Drupal, you have toindicate here the build file for drush.

Finally, after indicated the archive container where the version must be stored, you can press the build button. Thiswill create a new application version, named from the current date, and execute the commands to build it and store itin the archive container.

If you want to check the commands results, you can open the log in the version window.

Finally, on the save tab you can manage the save options for this application. You can specify :

• The backup container for containers and bases.

• The time between each automatic save. Since some backup methods use global deduplication, you can makefrequent saves without having to worry too much about disk space in the backup container.

4.2. Application 29

Page 34: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

• The time between each save repository change the time before a repository is deleted. Check the Save chapterfor more informations about repositories and their utilities.

• The time before a backup expiration.

All theses settings are inherited but can be changed in containers and bases forms.

30 Chapter 4. Applications

Page 35: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

CHAPTER 5

Containers

To create a new container on one of your server, you just have to add it in the Containers menu and it will be automat-ically deployed.

The important fields are :

• The container name. You can only use here lowercase, digit and hyphen.

• The application which will be hosted in the container, the server where it will be deployed and the image versionwhich will be used. When you change the application value, it will automatically update the server, the imagewith the info from the application and the image version with the last version available.

• You can use the no save checkbox if you don’t want to auto backup this container, because it may take too longfor example. Note that some times backups may be done anyway, like during a restoration for example.

• See the Image chapter for more information about the Privileged checkbox. Use with caution.

• Check the public checkbox if you want all users of the Clouder to be able to use this container. Otherwise, auser can only access a container if he is the manager of this container (or an administrator).

31

Page 36: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

See the Images and Applications chapters for more informations about options, ports, volumes, and links.

When you save the new container :

• The command to create the new container will be launched on the target server,

• The ports and volumes will be configured,

• An ssh key will be generated and automatically assigned to the container so Clouder can connect to it and goinside. Note that this key is updated daily.

• The commands post creation will finish to configure the container

• The links will be deployed.

You can check all the executed command in the log.

If something went wrong, you can use the reinstall button to purge and reinstall the container. You can also also usethe restart/stop buttons to restart the container and use the reset key button if Clouder can’t access the container or youwant to update the key for security reasons.

32 Chapter 5. Containers

Page 37: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Finally, you have to configure in the save tab the backup container where the backup will be stored. The repositorywill be automatically created if needed, see the Applications chapter for more informations about the others fields.You can use the Save button to force a manual backup, use the comment field if you want to easily find this backuplater. Note that all saves update the next save date field.

33

Page 38: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

34 Chapter 5. Containers

Page 39: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

CHAPTER 6

Services

A service is an installation of an application inside a container. For some applications, like Odoo or Drupal, you canhave several services inside the same container.This is useful if you want to give an ssh access of a container to a customer, and have the production anddevelopment/test services inside the same container.

To create a new service on one of your containers, you just have to add it in the Services menu and it will be automat-ically deployed.

The important fields are :

• The service name. You can only use here lowercase, digit and hyphen.

• The container where the service will be install, this will automatically fill the application.

• The application version to use, to know which archive shall be used.

• The database password. If the application use a database, a new database user will be created along with theservice and you have to define his password. A password is automatically generated but you can use one ofyours.

• If you use a custom version of the files. If yes, the files inside the archive will be copied inside the container, ifno and if the symlink is allowed in the application type, a symlink will be created. Check with caution, this maystrongly increase the container backups size.

35

Page 40: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

• Check the public checkbox if you want all users of the Clouder to be able to use this service. Otherwise, a usercan only access a service if he is the manager of this service (or an administrator).

You can specify a parent service. This link is interesting to easily deploy files from the development service to theproduction service, if you click on the Deploy to parent button it will automatically (after a container backup) deletethe production files, replace them with the files from child service and trigger an update on all the bases linked to theparent service.

You can also easily create a subservice by indicating the name of the subservice and clicking on Install subservice.This will create the subservice with the same files, link it to the current service, and duplicate all the base linked to thecurrent service. Use Install test and Install formation to install these subservices.

See the Applications chapter for more informations about options and links. Note that a link to a database container isoften required.

When you save the new service :

• If needed, the files will be copied from the archive to the host system and will be copied inside the container.

• A database user will be created.

• The commands post creation will finish to configure the service

• The links will be deployed.

You can check all the executed commands in the log.

36 Chapter 6. Services

Page 41: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

If something went wrong, you can use the reinstall button to purge and reinstall the service.

37

Page 42: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

38 Chapter 6. Services

Page 43: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

CHAPTER 7

Domains and Bases

7.1 Domains

In the Domain menu you can manage the domain managed by your Clouder.

39

Page 44: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

In the domain form, you have to specify :

• The domain, only lowercase, digit, hyphen and dot. are accepted.

• The organization managing the domain.

• The DNS container which will manage the domain.

• If you have one, a wildcard ssl certificate which you’ll be able to use for all subdomains.

• Check the public checkbox if you want all users of the Clouder to be able to use this domain. Otherwise, a usercan only access a domain if he is the manager of this domain (or an administrator).

When you save the new record, a configuration file will be installed in the DNS server to manage the domain. You cancheck the result of the command in the logs

You can use the reinstall button if you think the domain has not be correctly installed.

7.2 Bases

A base correspond to an url which will be available on the Internet, and often correspond to a database.

40 Chapter 7. Domains and Bases

Page 45: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

The important fields are :

• The base name. You can only use here lowercase, digit and hyphen.

• The base title. The application will be configured with this title.

• The domain to use. The application will be available at the url BASENAME.DOMAIN

• The application of the base. When you select it, some fields like the admin name/email, links and options willbe inherited.

• The service which will manage the base. If not filled, a new container and a new service will automatically becreated.

• If you need load balancing for this base, you can configure some alternative services (not working yet).

• You can specify the login/password/email for the admin account. The password will be automatically generated.

• Same for the poweruser login/password/email. A poweruser account is used if we don’t want to give adminaccess to the user who requested the creation of the base.

• The type of installation which shall be made. Build will make a full installation of the application, while restore(not yet working) will restore and configure a dump file.

• The default language which shall be configured in the application.

• You can use the ssl only checkbox if you want the url to be only accessible through ssl. All users will beredirected on the SSL port of the proxy.

• You can use the no save checkbox if you don’t want to auto backup this base, because it’s a test base for example.Note that sometimes backups may be done anyway, like during a child reset or a migration for example.

• You can check the test checkbox to install the application with the demo data.

• You can check the Reset each day checkbox if the base shall be reinstall everyday. If a parent base is specified,the base will not be reinstalled but will be reset by a copy of the parent base.

• If you have one, you can specify the key and certificate ssl to secure the connexion to the application. If youdon’t specify one, an auto-generated certificate will be used.

• You can specify a parent base. Then a button to reset the base with the parent will be displayed.

• Check the public checkbox if you want all users of the Clouder to be able to use this base. Otherwise, a user canonly access a base if he is the manager of this base (or an administrator).

7.2. Bases 41

Page 46: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

See the Applications chapter for more informations about options and links.

When you save the new base :

• The new database will be created.

• The commands post creation will configure the base.

• The admin and poweruser will be created.

• If test is checked, the demo data will be installed.

• The links will be deployed.

You can check all the executed commands in the log.

If something went wrong, you can use the reinstall button to purge and reinstall the base.

Finally, you have to configure in the save tab the backup container where the backup will be stored. The repositorywill be automatically created if needed, see the Applications chapter for more information about the others fields.

42 Chapter 7. Domains and Bases

Page 47: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

You can use the Save button to force a manual backup, use the comment field if you want to easily find this backuplater. Note that all saves update the next save date field.

7.2. Bases 43

Page 48: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

44 Chapter 7. Domains and Bases

Page 49: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

CHAPTER 8

Backups and Configuration

8.1 Backups

Clouder take care of the backup management and will periodically launch a backup on containers and bases.

Two methods are today available for the backups :

Simple, will simply copy the files in a directory of the backup container.

Bup, will store the backup into a bup repository. Bup is a backup solution based on git which will do globaldeduplication on the backup to massively save disk space. With bup, you can make hourly backup without having toworry about disk space.Among the downside it’s difficult to remove a backup once on bup, that’s why we sometimes change the repositorywhere backup are stored, and we need to manage the concept of repository on Clouder.

You can see the list of all backup on the Save menu.

Each backup container contains :

• His name

• The Backup container where it is stored.

45

Page 50: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

• His repository.

• The reason for the backup.

• The date.

• The date when the backup will be deleted.

All backups are linked to the container/service/base from which it was generated, but also most of the informationsfrom container/service/base are stored into the save form because we need them if we need to regenerate them becausethe object was deleted.

To restore a backup, you simply can press the button restore, after having change the Restore to fields if you want torestore in another container of base. If not, it will delete the current container/base (after another backup).

The restore will :

• If container, it will delete the content of the volumes and restore them from the backup.

• If base, if will drop the database and restore it

• Some specific files may be restored if specified in the python code of the template modules.

You can check the save and restore commands execution on the log window.

46 Chapter 8. Backups and Configuration

Page 51: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

8.2 Configuration

On the Configure Clouder menu you’ll find some buttons to execute maintenance tasks :

• Reset keys will reset the keys of all containers managed by Clouder.

• Save All will perform some maintenance task on the backup containers (if they use Bup), will launch a save onall containers and bases, and upload a copy of the backup containers to their backup-upload links.

• Purge expired saves will drop all saves which pass their expiration date.

• Purge expired logs will drop all logs which pass their expiration date.

• Reset bases will launch the reset action on the bases which have the Reset each day checkbox set to True.

• Launch daily cron will execute all the above task, and is linked to a daily cron.

• Launch next save will execute a backup on all containers/bases which pass the next save date. It’s linked to acron which is executed every thirty minutes.

8.2. Configuration 47

Page 52: Clouder Documentation - Read the Docs · Once installed using Clouder is easy, but set up all the infrastructure may take some time. Execute all this tutorial can take around two

Clouder Documentation, Release 1.0

Reset keys, Save All and Reset bases, the longest tasks, will update the configuration dates when they end their actions,so you can easily know at which time the actions finished.

You also have to indicate in the configuration the sysadmin email. It’s a requirement, you can’t use Clouder with thisfield empty.

48 Chapter 8. Backups and Configuration