First Deploy with Ansible AgnosticD

First Deploy with AgnosticD

This is the second in a series of posts about using, and contributing to, AgnosticD. An Ansible based deployer. In this article we’ll work our way through getting started and deploying a multi-node config, called three-tier-app to AWS. The video, and the steps below, cover the same content.

Step by Step

AgnosticD runs fine on both Linux and MacOS with Windows users strongly recommended to use a Linux VM, though I’d love to hear if anyone has run it in a Windows Subsystem for Linux. This article and the video above were run on a Red Hat Enterprise LLinux 7.6 system and should work also on both Fedora and CentOS. Ubuntu and Debian users can probably get by with swapping yum for apt, and MacOS users are recommended to use brew in a similar role.

  1. Ensure base pre-requisites are present

    You’ll need both git and ansible to get started, if they are missing:

    $ sudo yum install -y ansible git
  2. Next you are ready to clone AgnosticD

    git clone https://github.com/redhat-cop/agnosticd.git
  3. Create a copy of the three-tier-app/sample_vars.file

    cp agnosticd/ansible/configs/three-tier-app/sample_vars.yml sample_vars.yml
  4. Customize your sample_vars.yml file

    vim sample_vars.yml

    Typically you’ll have to modify several vars. This HOWTO assumes you have AWS Credentials and a domain.

    env_type: three-tier-app                                (1)
    output_dir: /tmp/workdir                                (2)
    
    guid: guid01                                            (3)
    subdomain_base_suffix: .example.opentlc.com             (4)
    
    own_repo_path: http://admin.example.com/repos/versiona  (5)
    
    cloud_provider: ec2                                     (6)
    aws_region: us-east-1                                   (7)
    HostedZoneId: <YOUR-HOSTZONE-ID>                        (8)
    key_name: ocpkey                                        (9)
  5. env_type - this tells AgnosticD what config to deploy (Don’t change this)

  6. output_dir - working scratch space for agnosticd, not need to change

  7. guid - a unique subdomain to deploy into

  8. subdomain_base_suffix - an existing domain to attach the guid subdomain to

  9. own_repo_path -

  10. cloud_provider - leave as ec2 though this config also supports azure

  11. aws_region - feel free to change this to whatever AWS region makes sense

  12. HostedZoneId -

  13. key_name

Note
<5> own_repo_path
Tony Kay avatar
About Tony Kay
Team lead for Automation and Management in Red Hat's GPTE DevOps and Automation team. Working globally, I focus primarily on Hybrid Cloud Automation with Ansible. About 2/3rds of my time is automating production cloud deployments and developing both code and training content. I also deliver Automation training globally to both Red Hat and Partner Consultants and Architects on cloud infrastructure using Ansible and on OpenShift/Kubernetes.
comments powered by Disqus