This playbook setup environment for running prebuilt .NET Core project
Requirements at ansible host:
- ansible version 2.2.0
- python >= 2.7
- python jinja >= 2.8
- python boto
- python boto3
- TeamCity installed in /opt/TeamCity directory
How it works:
Provided playbook do the following things:
- Creates SSH key in AWS and stores it in two locations: current playbook directory and /root/.ssh/eldar.pem (role ec2-key)
- Creates VPS (AWS virtual private cloud) (role vpc)
- Creates SG (AWS security group) with ports 80, 443, 22 opened to world (role sg)
- Creates t2.micro EC2 instance with clean Ubuntu xenial (check "image" variable in group_vars/all) (role ec2-instances)
- Installs at created instance nginx, dotnet, setup kestrel service via systemd (role frontend)
- Prepares playbook for Teamcity processing (role prepare)
To start playbook, provide aws_access_key and aws_secret_key variables, install requirements and type following command: ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook main.yml