Ansible with automation(9) - Multi Environment Architecture
- Get link
- Other Apps
Introduction
Until series 9, we've prepared to create Docker Cluster and to deploy microservices to the Cluster. From this series, we will start to deploy services to multiple environment.
Architecture
From one of our project, we want to automate from creating VMs to deploy microservices. I've looked at multiple difference options for automation. However, my choice is Ansible because it doens't need any additional installation on the remote machines.
To march the entire steps, I segmented entire scopes to the following segments;
- Creating VMs from VMWare and manage ip addresses (CreateVMs.yaml)
- Creating Docker Cluster with Community edition (BuildDockerCECluster.yaml)
- Deploying default services such as Artifactory, Kong, etc (BuildDefaultMicroService.yaml)
- Build Docker private repository. Final choice is to use "Harbor" from VMware.
- Deploying custom solutions to Docker Cluster (DeployMicroservices.yaml)
This is the entire drawing to support from the above segments
Overview of multiple environment
Each environment; Production, Test, and Development will have the following configuration
Each environment will have two docker clusters for DMZ and Internal network. The service in DMZ will focus on Authentication and Authorizatoin and Internall will provide actual service.
Folder Structure
D:\BITBUCKETREPO\ANSIBLE
| BuildDefaultMicroService.yaml
| BuildDockerCECluster.yaml
| CreateDockerVolumes.yaml
| CreateVMs.yaml
| DeployMicroservices-Test.yaml
| DeployMicroservices.yaml
| README.md
| sethostname.yaml
| test.yaml
|
+---dockerimages
| artifactory-mssql.yaml
| artifactory.yaml
| db.properties
| ExactCallLogService.yaml
| mssql-jdbc-6.4.0.jre8.jar
| SalesRouteService.yaml
|
+---inventory
| +---prod
| | hosts
| |
| +---shared_vars
| | shared-secrets.yml
| | shared-vars.yml
| |
| \---test
| +---dmz
| | | docker_hosts
| | | vm_hosts
| | |
| | \---group_vars
| | docker.yml
| | secrets.yml
| | vcenter.yml
| |
| \---internal
| | cicd_list (Service which will be deployed to Docker)
| | docker_hosts (docker hosts to build cluster)
| | vm_hosts (vm hosts to provide docker service)
| |
| \---group_vars
| docker.yml
| secrets.yml
| vcenter.yml
|
+---tasks
| load-vars.yml (this will load all variable from group_vars under inventory)
|
\---templates
daemon.j2
Summary
We looked at general structure to support 3 environments with 2 docker cluster for intenral and DMZ.
From the next series, we will look at detail steps how to implement.
- Get link
- Other Apps
Comments
Post a Comment