An open API service indexing awesome lists of open source software.

https://github.com/hackoregon/hacko-infrastructure

Builds hackoregong AWS vpc
https://github.com/hackoregon/hacko-infrastructure

Last synced: about 1 year ago
JSON representation

Builds hackoregong AWS vpc

Awesome Lists containing this project

README

          

#
# Here are the basic steps to get this repo working

1. Change names and values in group_vars/all/main.yml as appropriate

4. Use ansible-vault to create the vault file:
ansible-vault create group_vars/all/vault

You need to define the following variables in the group_vars/all/vault file:
All password hashes should be generated with: mkpasswd --method=SHA-512
-------------------------------------------
aws_access_key: xxxxxxxxxxxxxxxxxxxx
aws_secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
keypair: mykepair

webmin_user: webmin
webmin_passwd: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Users are in a dictionary structure like so
my_users:
user1:
group: "admin"
shell: "/bin/bash"
passwd: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
vpn_phrase: "TheVPNPassPhrase"
pub_key: ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
user2:
group: "wheel"
shell: "/bin/bash"
passwd: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
vpn_phrase: "AnotherVPNPassPhrase"
pub_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

-------------------------------------------
pub_key is the user's id_rsa.pub file. Just paste the whole contents of that file after pub_key:

5. edit make-vpc.yml and increment the counter for the id variable:
"id: '{{bastion_group}}_{{region}}02'" becomes "id: '{{bastion_group}}_{{region}}03'", etc
This may not be strictly necessary, but the id variable implements ec2 client tokens for idempotency.

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html

6. edit all localized names in make-vpc.yml. update hosts: tag_Name_natvpn_hackoregon
in particular. the last portion should match the "owner" var.

7. add the vault password you used in step 3 to ~/.vault_pass.txt. chmod 600 ~/.vault_pass.txt

7. From the repo root: ./launchvpc.sh