Unable to launch an openstack instance from Jenkins windows

asked 2017-02-15 09:31:39 -0600

SM gravatar image


I have installed Jenkins on my windows machine and I have integrated OpenStack with Jenkins and I am able to give all OpenStack windows images templates in Jenkins. But when I tried launching an instance using yaml file from Jenkins I get below error. Please refer the yaml file and error below and please help me to launch a windows instance from Jenkins successfully.

heat_template_version: 2013-05-23

description: Devops standard template for Boot from snaphost and secondary volume and user data and floating IP

parameters: image: type: string description: ID of cinder snapshot used to create a volume to boot instance upon #TPq! / DevOps / Volume Snapshot / sysprep_2012 default: 5e3439e8-e06d-4cdd-b801-a57e53224392 flavor: type: string description: Flavor to use for the server #TP / DevOps / Flavors / 16GB_4CPU_COMMON default: 32GB_8CPU availability_zone: type: string description: Availability zone default: win-test public_net_id: type: string description: ID of public network for which floating IP addresses will be allocated #nova network-list default: 59a2e151-73d6-46cf-b5f3-4b6c89d0220c private_net_id: type: string description: ID of private network into which servers get deployed nat default: 400d3dcf-9350-4192-9521-ecbe912bab01 private_subnet_id: type: string description: ID of private sub network into which servers get deployed #from patricks IM default: c5312508-7afb-45bc-ad21-9ea4b4d0a0d4 devops_app: type: string default: Windows2012Standard_R2_x64.Bare.test


my_boot_vol: type: OS::Cinder::Volume properties: snapshot_id: { get_param: image }

availability_zone: {get_param: availability_zone}

    stack_name: { get_param: "OS::stack_name"}
    stack_id: { get_param: "OS::stack_id"}

my_instance: type: OS::Nova::Server depends_on: my_boot_vol properties: block_device_mapping: [{"device_name": xvda, "volume_id": { get_resource: my_boot_vol } }] flavor: { get_param: flavor } config_drive: "True" user_data: str_replace: template: | { "devopsapp": "devops_app", } params: devops_app: { get_param: devops_app }

    stack_name: { get_param: "OS::stack_name" }
    stack_id: { get_param: "OS::stack_id" }
  availability_zone: {get_param: availability_zone}
  - port: { get_resource: my_instance_port }

my_instance_port: type: OS::Neutron::Port properties: network_id: { get_param: private_net_id } fixed_ips: - subnet_id: { get_param: private_subnet_id }

my_instance_floating_ip: type: OS::Neutron::FloatingIP properties: floating_network_id: { get_param: public_net_id } port_id: { get_resource: my_instance_port }

outputs: my_instance_private_ip: description: IP address of the server my_instance in the private network value: { get_attr: [ my_instance, first_address ] } server1_public_ip: description: Floating IP address of the server my_instance in the public network value: { get_attr: [ my_instance_floating_ip, floating_ip_address ] }

instance_details: description: instance details value: {get_attr: [my_instance, show]}

Error from Jenkins while launch an instance

Started by user Administrator [EnvInject] - Loading node environment variables. Building on master in workspace C:\Program Files (x86)\Jenkins\workspace\Launch New Instance HOT PlayerINFO : Start create stack jenkinsinstance on windows-imaging HOT PlayerERROR : Error during stack treatment : jenkinsinstance ,ClientResponseException{message=Environment not in valid format: environment has wrong section "outputs", status=400, status-code=BAD_REQUEST} at org.openstack4j.core.transport.HttpExceptionHandler.mapException(HttpExceptionHandler.java:38) at org.openstack4j.core.transport.HttpExceptionHandler.mapException(HttpExceptionHandler.java:23) at org.openstack4j.core.transport.HttpEntityHandler.handleLessThan500(HttpEntityHandler.java:101) at org.openstack4j.core.transport.HttpEntityHandler.handle(HttpEntityHandler.java:47) at org.openstack4j.connectors.okhttp.HttpResponseImpl.getEntity(HttpResponseImpl.java:69) at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:193) at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:187) at org.openstack4j.openstack.heat.internal.StackServiceImpl.create(StackServiceImpl.java:31) at com.arkea.jenkins.openstack.client.OpenStack4jClient.createStack(OpenStack4jClient.java:122) at com.arkea.jenkins.openstack.operations.StackOperationsUtils.createStack(StackOperationsUtils.java:133) at com.arkea.jenkins.openstack.heat ... (more)

edit retag flag offensive close merge delete