grycap / im

Infrastructure Manager
https://www.grycap.upv.es/im
GNU General Public License v3.0
63 stars 21 forks source link

Contextualization process gets stuck for Ubuntu 16.04 on AWS #198

Closed gmolto closed 7 years ago

gmolto commented 7 years ago

I have deployed an instance of Ubuntu 16.04 LTS - Xenial (HVM) on AWS through the IM but, apparently, the contextualization process is stuck, but no error is arisen, probably because the machine does not have python installed.

gmolto commented 7 years ago

This does not appear to be related to Ubuntu 16.04 and the lack of Python. I submitted the enclosed template at the bottom, where ami-5ac2cd4d refers to an Ubuntu 14.04 LTS with Python 2.7.6 and the contextualization does not even start. Files are copied to /tmp/.im but no attempt to contextualization appears to occur.

tosca_definitions_version: tosca_simple_yaml_1_0

imports:

description: TOSCA example for specifying a Mesos Cluster

topology_template:

node_templates:

mesos_master:
  type: tosca.nodes.indigo.MesosMaster
  properties:
    marathon_password: test_pass
    chronos_password: test_pass
  requirements:
    - host: mesos_master_server

mesos_slave:
  type: tosca.nodes.indigo.MesosSlave
  properties:
    master_ips: { get_attribute: [ mesos_master_server, public_address ] }
  requirements:
    - host: mesos_slave_server

mesos_load_balancer:
  type: tosca.nodes.indigo.MesosLoadBalancer
  properties:
    master_ips: { get_attribute: [ mesos_master_server, public_address ] }
  requirements:
    - host: mesos_lb_server        

mesos_master_server:
  type: tosca.nodes.indigo.Compute
  capabilities:
    endpoint:
      properties:
        network_name: vpc-6366c106.subnet-de5252f6.PUBLIC 
    scalable:
      properties:
        count: 1
    host:
      properties:
        num_cpus: 2
        mem_size: 2 GB
    os:
      properties:
        type: linux
        distribution: ubuntu
        version: 14.04
        image: aws://us-east-1/ami-5ac2cd4d
        credential:
           user: ubuntu
           token: anything

mesos_slave_server:
  type: tosca.nodes.indigo.Compute
  capabilities:
    endpoint:
      properties:
        network_name: vpc-6366c106.subnet-de5252f6.PUBLIC 
    scalable:
      properties:
        count: 1
    host:
      properties:
        num_cpus: 1
        mem_size: 1 GB
    os:
      properties:
        type: linux
        distribution: ubuntu
        version: 14.04
        image: aws://us-east-1/ami-5ac2cd4d
        credential:
           user: ubuntu
           token: anything

mesos_lb_server:
  type: tosca.nodes.indigo.Compute
  capabilities:
    endpoint:
      properties:
        network_name: vpc-6366c106.subnet-de5252f6.PUBLIC 
    scalable:
      properties:
        count: 1
    host:
      properties:
        num_cpus: 1
        mem_size: 1 GB
    os:
      properties:
        type: linux
        distribution: ubuntu
        version: 14.04
        image: aws://us-east-1/ami-5ac2cd4d
        credential:
           user: ubuntu
           token: anything

outputs: mesos_lb_ips: value: { get_attribute: [ mesos_lb_server, public_address ] } mesos_master_ips: value: { get_attribute: [ mesos_master_server, public_address ] }

gmolto commented 7 years ago

For the sake of completeness, the same behaviour is obtained with simpler templates, different AMIs and deploying on EC2-Classic.

Enclosed a sample template.

tosca_definitions_version: tosca_simple_yaml_1_0

imports:

description: > TOSCA test for launching the Wine Cellar Application (PHP Version) (https://github.com/ccoenraets/wine-cellar-php) using the simple in memory DB with a single web server node.

topology_template:

inputs: download_url: type: string default: https://raw.githubusercontent.com/indigo-dc/tosca-types/master/artifacts/webapps/cellar-webapp-mem.tgz

node_templates: apache: type: tosca.nodes.WebServer.Apache requirements:

gmolto commented 7 years ago

After rebooting the IM server, the contextualization starts, Ansible gets installed BUT, apparently, the contextualization stops. No other packages are installed and an empty log is obtained when querying: http://servproject.i3m.upv.es:8811/infrastructures/{{IM_INF_ID}}/vms/0/contmsg

I tried with the very same template in my early post. Let's discuss this next week.

gmolto commented 7 years ago

This is currently working so I am closing this issue.