README.md 799 Bytes
Newer Older
Johan Ruuskanen's avatar
Johan Ruuskanen committed
1
Terraform script to setup a virtual machine on ERDC Xerces, with associated virtual network and security group rules to allow for remote SSH access.
Johan Ruuskanen's avatar
Johan Ruuskanen committed
2

Johan Ruuskanen's avatar
Johan Ruuskanen committed
3
#### Prerequests
Johan Ruuskanen's avatar
Johan Ruuskanen committed
4

5
6
7
8
9
10
11
 * API access to Xerces via either the `cloud.yml` or OpenStack RC file. Both can be found in the "API Access"-tab on your project page on the xerces webpage

 * Terraform, tested with v 0.15.1

#### Instructions

Update the values in `cluster.tfvars`, and then setup the VM by running
Johan Ruuskanen's avatar
Johan Ruuskanen committed
12
13
14

```
terraform init
15
terraform apply -var-file=cluster.tfvars
Johan Ruuskanen's avatar
Johan Ruuskanen committed
16
```
17
18
Note the public IP assigned. Add the SSH key to your ssh-agent by running

Johan Ruuskanen's avatar
Johan Ruuskanen committed
19
20
21
22
```
eval $(ssh-agent -s)
ssh-add /path/to/your/private/key
```
23
You can now ssh into your virtual machine using `ssh ubuntu@vm-public-ip`.
Johan Ruuskanen's avatar
Johan Ruuskanen committed
24

25
#### Remove the terraform instance
Johan Ruuskanen's avatar
Johan Ruuskanen committed
26
Simply run `terraform destroy`