Hey Guys
I am just starting out with Rancher and I am trying to setup Rancher Server on AWS. Here is what I want to achieve:
- I want to launch one node in an auto-scale group. The node will run both Rancher server and MySQL.
- I want to mount a volume from EFS for MySQL data.
- I am using Ubuntu 16.04 as host machine.
I have created a launch configuration for auto-scale group with the following user-data:
#cloud-config
package_upgrade: true
packages:
- nfs-common
- docker.io
runcmd:
- mkdir -p /mnt/rancherserverefs/
- chown ubuntu:ubuntu /mnt/rancherserverefs/
- echo "$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).<filesystem>.efs.us-east-1.amazonaws.com:/ /mnt/rancherserverefs nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0" >> /etc/fstab
- mount -a -t nfs4
- usermod -aG docker ubuntu
- docker run -d -v /mnt/rancherserverefs:/var/lib/mysql --restart=unless-stopped -p 8080:8080 rancher/server
The server seems to mount the EFS volume correctly as well as setup the container correctly. I can see some files created in the EFS volume. Container can be seen running in “docker ps”. However, the Rancher server cannot be opened in the browser. The security group is wide open so cannot be that.
I have waited long enough and tried multiple times. Any ideas of what I might be doing wrong?