Creating OMniLeads images¶
OMniLeads has an image for each software’s service. These images are available in our Docker-Hub. You can create you own images based on Dockerfiles that are predefined for each service, you must consider this:
- Ansible is used as a tool to build a bunch of images at same time, so the Dockerfiles are Ansible’s templates, located in deploy/ansible/roles/docker/files/Dockerfiles. If you want to make a change in Dockerfiles you must have some Ansible knowledge
The DevEnv and the ProdEnv¶
OMniLeads offers a develop environment (DevEnv) created to Django developers who wants to contribute in the project, we maintain that images, they are nine, one for each system’s service. This environment is the best to develop changes in code and then see the changes in realtime, without restarting containers. On the other hand the ProdEnv is the best environment for production, using images of five services.
Image build¶
To build images follow these steps:
- Specify in ansible’s inventory file which environment you want to build. Uncomment the line that says #localhost, depending of the environment
# If you are installing a devenv (PE) uncomment [prodenv-container] #localhost ansible_connection=local # If you are installing a devenv (DE) uncomment [devenv-container] #localhost ansible_connection=local
- In the same file, check the section [docker:vars], you will see there variables withouth value:
[docker:vars] registry_username= registry_email= registry_password= oml_release=
Insert there the username, email and password of Registry where you want to upload your images. The variable oml_release is used only when you want to build images for ProdEnv. This variable is going to define the Tag that will have the images.
- Lastly, execute the deploy.sh script with this option:
./deploy.sh --docker-build
Note
In this process the build and push of the images are going to be done, so if you experiment any mistake due to internet connection problems, run again the script.