Resin 4 Script for cloud EC2 video for JavaOne
From Resin 4.0 Wiki
- Created triad0 server. m1.small.
- Install Resin via yum
- See Getting Started Guide
- Install emacs
-
$ sudo yum install emacs
-
- Create an admin_password and a system_key too.
-
$ resinctl generate-password admin faconbacon7
-
- Edit /etc/resin/resin.properties
-
$ sudo emacs /etc/resin/resin.properties
-
admin_user : admin
admin_password : {SSHA}x18npiJhbmK85geKdC5l8Xr7fIT+uxce
admin_user : admin admin_password : {SSHA}aF8k/6ZWcvzmMJ9jTWNHGxi+0Uc+3w6r
Properties for triad0:
elastic_cloud_enable : true home_cluster : app home_server : app-0 app.https : 8443 remote_admin_enable : true app_servers : ext:23.21.106.227 ext:23.21.121.216 ext:23.21.195.83 cluster_system_key : changeme
- Only if you want admin enabled
web_admin_enable : true web_admin_external : true web_admin_ssl : true admin_user : admin admin_password : {SSHA}generatethispasswordwithREsinCTL/XJCE
TODO Talk about how to configure Amazon Security Group
Note that remote_admin_enable is needed for ext: discovery.
Table:
triad0 = app-0 = ext:23.21.106.227 triad1 = app-1 = ext:23.21.121.216 triad2 = app-2 = ext:23.21.195.83
https://23.21.106.227:8443 https://23.21.121.216:8443 https://23.21.195.83:8443
5) Install the license file
6) Clone triad0 then make triad1 and triad2 from the clone
7) Assign the triad servers the correct Elastic IPs
8) Modify home_server for triad1 and triad2 to app-1 and app-2 respectively.
9) Go to resin-admin of triad0 and see if it sees triad1 and triad2 https://23.21.106.227:8443/resin-admin/
10) Create another clone called elastic1
Add this elastic_server : true
Remove home_server (comment it out)
11) Go to resin-admin of triad0 and see if it sees the elastic server
12) Clone and spin up another elastic server
13) Go to resin-admin of triad0 and see if it sees the elastic server
14) Try to deploy a small war file to all remotely
ssh -i resin2.pem ec2-user@23.21.121.216 ssh -i resin2.pem ec2-user@23.21.195.83