https://github.com/markbrown4/infra
l33t haxOr
https://github.com/markbrown4/infra
Last synced: 2 months ago
JSON representation
l33t haxOr
- Host: GitHub
- URL: https://github.com/markbrown4/infra
- Owner: markbrown4
- Created: 2017-11-30T15:05:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-04T23:35:57.000Z (over 7 years ago)
- Last Synced: 2025-01-19T23:38:51.949Z (4 months ago)
- Language: HCL
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mbops
infra code to manage personal server(s)
```
brew install terraform
brew install python
sudo pip2 install awscli --ignore-installed six
```## Configure awscli
```bash
export AWS_DEFAULT_REGION="ap-southeast-2"
export AWS_PROFILE="yellowshoe"
aws configure set profile.yellowshoe.region ap-southeast-2
aws configure set profile.yellowshoe.aws_access_key_id
aws configure set profile.yellowshoe.aws_secret_access_key
```## Configure terraform
```bash
terraform init
# modify .tf script
terraform plan
terraform apply
```## linux
```bash
ssh ubuntu@$ sudo netstat -lnp # see what ports are in use
$ curl 127.0.0.01:80 # check nginx running
```## ansible
Install python2 on remote
```bash
$ apt-get install python -y
```Install
```bash
sudo pip2 install ansible
mkdir /etc/ansible
# Add public ip / dns hostname
touch /etc/ansible/hosts
# check ansible can connect
ansible all -m ping --user ubuntu
```## nginx
Install
```bash
ansible-galaxy install nginxinc.nginx-oss
ansible-playbook playbooks/nginx.yml
```Verify
```bash
$ which nginx
$ sudo netstat -lnp
$ curl 127.0.0.1:80
```