Attention: for Windows users, replace gradlew
with gradlew.bat
- Set up EC2 instance and pull from master
- Update instances to Java 8 if required
- Create a "Server.txt" file in the project root with Public DNS addresses of each EC2 instance
- Note: this implementation currently only accommodates up to 6 instances
- Run the following command to build, deploy, and run distributed tests
> ./gradlew bootstrapAws distributedTest -Ppem=/Users/kierse/.ssh/eece513_aws.pem
- In any EC2 instance home directory, use the startClient command as you would call a grep command
> ./startClient [OPTION]
> ./gradlew clean
> ./gradlew jar
> java -cp build/libs/distributed-grep-1.0-SNAPSHOT.jar eece513.client.GrepClient
> java -cp build/libs/distributed-grep-1.0-SNAPSHOT.jar eece513.server.GrepServer
> ./gradlew distributedTest
> ./gradlew test
> sudo yum install java-1.8.0
> sudo yum remove java-1.7.0-openjdk
- On the EC2 Dashboard, select Launch Instance
- Create a instance of type Amazon Linux AMI 2017.09.1 (HVM), SSD Volume Type
- Leave the defaults as is by selecting Review and Launch > Launch at the bottom right of the screen
- In the following popup, select Create a new key pair from the first dropdown
- Give it a name and select Download to get your private key
- Finally, select Launch Instance
- Under INSTANCES > instances on the left sidebar, select the instance you want to clone
- Select Actions > Launch More Like This
- Note: for ease of use, use the same security group
- Select the security group associated with your instances e.g. launch-wizard-1
- In the split window on the bottom, select the Inbound tab
- Select Edit
- Then on the popup window, ensure you have 2 rules:
> Type: All traffic, Destination: 0.0.0.0/0 > Type: SSH, Destination: 0.0.0.0/0
- If one rule is missing, select Add Rule to generate a new line
- Repeat for the Outbound tab