# V3 Server Fleets

## The process:

1. Determine a new name for the server fleet (e.g. $name = "ThisIsATest")
2. Go to Amazon and create a new key pair using the name from 1 (ThisIsATest.pem)
3. Save the resulting .pem file.

TODO - ask David!


## Copy terraform scripts to deploy the server fleet.

Copy terraform files to the jenkins server:

```
JENKINS_USER_NAME='ubuntu'
JENKINS_SERVER_IP='ec2-34-217-118-93.us-west-2.compute.amazonaws.com'
JENKINS_DEST_PATH=/home/ubuntu
RSYNC_DEST=$JENKINS_USER_NAME@$JENKINS_SERVER_IP:$JENKINS_DEST_PATH
scp -i "$BIGSCREEN_DROPBOX_PATH/Server_Keys/_Jenkins/JenkinsBuildServerA.pem" -r ./arch5-media-only $RSYNC_DEST/terraform/WhiskeyMediaGroupC
```

## Jenkins

```
ssh -i "$BIGSCREEN_DROPBOX_PATH/Server_Keys/_Jenkins/JenkinsBuildServerA.pem" ubuntu@ec2-34-217-118-93.us-west-2.compute.amazonaws.com
```


# Whiskey Main - MediaServerGroupB

terraform plan -var="stage=WhiskeyMain" \
                -var="cloudmedia_count=5" \
                -var="cloudmedia_key_name=WhiskeyMain" \
                -var="suffix=GroupB" \
                -var="cloudmedia_instance_type=c5.large"

terraform apply -var="stage=WhiskeyMain" \
                -var="cloudmedia_count=5" \
                -var="cloudmedia_key_name=WhiskeyMain" \
                -var="suffix=GroupB" \
                -var="cloudmedia_instance_type=c5.large"


# Whiskey Main - MediaServerGroupC

terraform plan -var="stage=WhiskeyMain" \
                -var="cloudmedia_count=10" \
                -var="cloudmedia_key_name=WhiskeyMain" \
                -var="suffix=GroupC" \
                -var="cloudmedia_instance_type=c5.large"

terraform apply -var="stage=WhiskeyMain" \
                -var="cloudmedia_count=10" \
                -var="cloudmedia_key_name=WhiskeyMain" \
                -var="suffix=GroupC" \
                -var="cloudmedia_instance_type=c5.large"