Skip to content

Saccilotto/cpplanta_infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Key Components

  • Terraform: Used for provisioning and managing the infrastructure.
  • Ansible: Used for configuration management and application deployment.
  • Docker Swarm: Used for container orchestration.

Getting Started

Prerequisites

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Set up environment variables:

    • Create a .env file in the root directory and add the necessary environment variables.
  3. Set up Swarm/static_ip.ini ips:

    • Add the static IP addresses and SSH locations details for the VMs in the Swarm/static_ip.ini file.
  4. Set up SSH keys:

    • Add the private keys for SSH access to the VMs in the ssh_keys/ directory.

Deployment

  1. Run the deployment script:

    Set up permissions to the script:

    chmod +x deploy.sh
    ./deploy.sh

    This script will:

    • Initialize and apply the Terraform configuration to provision the infrastructure.
    • Deploy the Docker Swarm stack using Ansible.
    • Run additional Ansible playbooks to configure the VMs.

Destroying the Infrastructure

  1. Run the destroy script:

    ./destroy.sh

    This script will:

    • Destroy the infrastructure provisioned by Terraform.

Configuration Details

Ansible Playbooks

  • Configuration/runners.yml: Contains tasks to set up GitLab Runners.
  • Swarm/swarm_setup.yml: Contains tasks to configure the Docker Swarm cluster.

Inventory

  • Swarm/static_ip.ini: Contains the static IP addresses and SSH details for the VMs.

SSH Keys

  • ssh_keys/: Contains the private keys for SSH access to the VMs.

Integrate with Your Tools

Test and Deploy

Use the built-in continuous integration in GitLab.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • AGES for providing the VMs and support.
  • GitLab for CI/CD tools and documentation.
  • Docker for containerization tools.
  • HashiCorp for Terraform.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages