Sign inSign up

wmdevops/oneclick-wme-setup-tool

By wmdevops

•Updated about 6 years ago

WME setup tool with terraform and ansible

Image
0

130

wmdevops/oneclick-wme-setup-tool repository overview

⁠oneclick-wme-setup-tool

⁠What is oneclick-wme-setup-tool

oneclick-wme-setup-tool will help to setup WME without any manual process . This tool built with the Terraform for infrastructure provisioning and Ansible for infrastructure configuration and Installing WME software on AWS.

⁠Softwares Installed in Docker Image

  • Softwares Installed in Docker image
    • Terraform Latest version
    • aws cli version 2
    • pip3
    • python3
    • ansible latest stable version

⁠How to Use

⁠Start container using wmdevops/oneclick-wme-setup-tool image and terminate it after WME setup process completed with below command.
  docker container run -d --rm -it --name <container-name> --network my-network -v <aws-credentiaas-file>:/root/.aws/ -v <private-key-location>:<private-key-location-in-Docker> -v <terraform-service-file-location>:/usr/local/wme-setup/service/ wmdevops/oneclick-wme-setup-tool:<tag> /bin/bash -c "terraform init;terraform validate;terraform apply"
  • Creating the container for WME setup process run the below command
  • Using the below command create Docker container and run execute the Terraform commands manually from Docker container.
  docker container run -d -it --name <container-name> --network my-network -v <aws-credentiaas-file>:/root/.aws/ -v <private-key-location>:<private-key-location-in-Docker> -v <terraform-service-file-location>:/usr/local/wme-setup/service/ wmdevops/oneclick-wme-setup-tool:<tag>
  • Example command for WME setup creation using Docker container
 docker container run --rm -it --name wmesetup --network my-network -v ~/.aws:/root/.aws/  -v ~/Downloads/onclick-wme/keys/:/usr/local/private_key/ -v ~/Downloads/onclick-wme/service:/usr/local/wme-setup/service/ wmdevops/oneclick-wme-setup-tool:1.0 /bin/bash -c "terraform init;terraform validate;terraform apply"
  • Example command for WME setup deletion using Docker container
 docker container run --rm -it --name wmesetup --network my-network -v ~/.aws:/root/.aws/  -v ~/Downloads/onclick-wme/keys/:/usr/local/private_key/ -v ~/Downloads/onclick-wme/service:/usr/local/wme-setup/service/ wmdevops/oneclick-wme-setup-tool:1.0 /bin/bash -c "terraform destroy"

⁠Using custom Terraform module files

⁠Terraform Module
  • Creating WME infrastructure in Cloud providers we are using Terraform Modules structure.A module is a container for multiple resources that are used together.

  • Every Terraform configuration has at least one module, known as its root module, which consists of the resources defined in the .tf files in the main working directory.

  • Terraform Module consists of main.tf, variable.tf and output.tf for infrastructure creation and also have ansible playbooks for instances configuration.for more information about terraform module structure and details visit terraform modules⁠

  • The default Module is located in container at /usr/local/wme-setup/module/wme-setup-creation/. which is provided by wavemaker inbuit in Docker image for WME setup process.

  • If the user want to use the customized module, mount module as a volume and specify the module location in service main.tf file

  • example Docker command: wme setup with custom terraform module

       docker container run -d --rm -it --name <container-name> --network host -v <aws-credentiaas-file>:/root/.aws/ -v <private-key-location>:<private-key-location-in-Docker> -v <terraform-service-file-location>:/usr/local/wme-setup/service/ -v <terraform-custom-module-file-location>:<terraform-custom-module-file-location-in-Docker> wmdevops/oneclick-wme-setup-tool:<tag> /bin/bash -c "terraform init;terraform validate;terraform apply"
    
⁠Terraform service folder details
  • Terraform service consists of files main.tf and outout.tf with the desired values for wme creation
  • The service files mount location in Docker container is /usr/local/wme-setup/service/
  • The Docker image have example Terraform service files main.tf and output.tf

⁠Creating WME setup on the different network of the Host, when host connected to the VPN connection

For creating WME setup on other networks of the host instance when connected with VPN connection, just simply run Docker container with host network.

docker container run -d -it --name <container-name> --network host -v <aws-credentiaas-file>:/root/.aws/ -v <private-key-location>:<private-key-location-in-Docker> -v <terraform-service-file-location>:/usr/local/wme-setup/service/ wmdevops/oneclick-wme-setup-tool:<tag>

⁠List of variables described in Docker command

  • aws-credentials-file are aws credentials and config file for communicating with aws for resources creation, and set profile for credentials as default or mention you own profile in service main.tf file at profile variable.
  • private-key-location consists of private keys for ssh into instance and for the internal user of wavemaker(custom user)
  • private-key-location-in-Docker have to specify in service main.tf file .
  • terraform-service-file-location is location of service files main.tf and output.tf in local
  • local/content/wme-setup/service/ is default service files location in Docker container
  • terraform-custom-module-file-location is the custom module location in local, if you user want to create wme setup with the custom terraform module
  • terraform-custom-module-file-location-in-Docker is the terraform module location in Docker container , and also user have to specify this location in main.tf file of service

Tag summary

Content type

Image

Digest

Size

394.3 MB

Last updated

about 6 years ago

docker pull wmdevops/oneclick-wme-setup-tool:1.0