Rancher Server on Ubuntu 16.04 w/ cloud-config

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:

  1. I want to launch one node in an auto-scale group. The node will run both Rancher server and MySQL.
  2. I want to mount a volume from EFS for MySQL data.
  3. I am using Ubuntu 16.04 as host machine.

I have created a launch configuration for auto-scale group with the following user-data:

package_upgrade: true
- nfs-common
- docker.io
- mkdir -p /mnt/rancherserverefs/
- chown ubuntu:ubuntu /mnt/rancherserverefs/
- echo "$(curl -s<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?

For people who might run into the same thing, the root cause was that I was using an instance with memory less than 1 GB. I changed the instance and the problem solved.