Forked from j-mprabhakaran/wp-ansible-terraform-initial-setup
Created
January 13, 2019 15:35
-
-
Save ZeroDeth/9babfef1a8dc8f59fe2aafc17b5028ae to your computer and use it in GitHub Desktop.
Initial setup required on the local machine for deploying wordpress site using ansible and terraform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Ubuntu: | |
| =================== | |
| sudo su | |
| python --version | |
| apt-get update | |
| apt install -y python-pip | |
| pip install --upgrade pip | |
| apt-get install curl -y | |
| curl -O https://releases.hashicorp.com/terraform/0.11.2/terraform_0.11.2_linux_amd64.zip | |
| mkdir /bin/terraform | |
| unzip terraform_0.11.2_linux_amd64.zip -d /bin/terraform | |
| ls /bin/terraform | |
| export PATH=$PATH:/bin/terraform | |
| terraform --version | |
| pip install awscli --upgrade | |
| aws --version | |
| apt-get update | |
| apt-get install software-properties-common | |
| apt-add-repository ppa:ansible/ansible | |
| apt-get update | |
| apt-get install ansible | |
| ansible --version | |
| ssh-keygen | |
| /root/.ssh/kryptonite | |
| ### DO THIS EVERYTIME LOGOUT and LOGIN ### | |
| ssh-agent bash | |
| ssh-add ~/.ssh/keyname | |
| ssh-add -l | |
| ### DO THIS EVERYTIME LOGOUT and LOGIN ### | |
| nano /etc/ansible/ansible.cfg | |
| uncomment host_key_checking = False | |
| ### Make working directory | |
| mkdir terransible | |
| cd terransible | |
| # MacOS: | |
| =================== | |
| Install Git on Mac: | |
| ================== | |
| Download Git from https://sourceforge.net/projects/git-osx-installer/files/latest/download?source=files | |
| Run the installer | |
| git --version | |
| Install AWS CLI on Mac: | |
| ====================== | |
| curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" | |
| unzip awscli-bundle.zip | |
| sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws | |
| aws --version | |
| Install Terraform on Mac: | |
| ======================== | |
| curl -O https://releases.hashicorp.com/terraform/0.11.3/terraform_0.11.3_darwin_amd64.zip | |
| unzip terraform_0.11.3_darwin_amd64.zip | |
| sudo cp terraform /usr/local/bin | |
| Install Ansible on Mac: | |
| ====================== | |
| sudo pip install ansible | |
| mkdir /Users/USER_NAME/.ssh | |
| ssh-keygen | |
| ### DO THIS EVERYTIME LOGOUT and LOGIN ### | |
| ssh-agent bash | |
| ssh-add /Users/USER_NAME/.ssh/keyname | |
| ssh-add -l | |
| ### DO THIS EVERYTIME LOGOUT and LOGIN ### | |
| nano /etc/ansible/ansible.cfg | |
| uncomment host_key_checking = False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment