# Can I get some help regard #cloud config

**URL:** <https://forums.suse.com/t/can-i-get-some-help-regard-cloud-config/1430>\
**Category:** Rancher 1.x\
**Created:** [January 9, 2016, 12:47am UTC](https://forums.suse.com/t/can-i-get-some-help-regard-cloud-config/1430 "2016-01-09T00:47:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![OddlyOrdinary](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@OddlyOrdinary](https://forums.suse.com/u/OddlyOrdinary)\
**Post date:** [January 9, 2016, 12:47am UTC](https://forums.suse.com/t/can-i-get-some-help-regard-cloud-config/1430/1 "2016-01-09T00:47:43Z")

</div>

I’m looking a basic setup for launching hosts using the AWS userdata field on autoscaling groups. I have the following

```auto
#cloud-config
rancher:
  services:
    register:
      privileged: true
      volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      image: rancher/agent:v0.8.2
      labels:
        environment=prod
        availability=stable
      command:
      - https://mydomain.com/v1/scripts/IPSUMLETTERSHASH?ISthisAkeyIshouldntSHAREheh

```

Anyway the labels on the host itself don’t appear, and maybe every other host actually registers itself with my host. They all have network access and if I manually ssh into the ones that don’t successfully register I can manually execute the docker rancher/agent code. Any suggestions?

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [January 9, 2016, 4:26am UTC](https://forums.suse.com/t/can-i-get-some-help-regard-cloud-config/1430/2 "2016-01-09T04:26:43Z")

</div>

When adding a host and host labels, the host label is actually added an as environment variable.

The docker command would be something like this, which I found by going to “Add Host” -\> “Custom” and just added the host labels that you showed.

```auto
sudo docker run -e CATTLE_HOST_LABELS='environment=prod&availability=stable' -d --privileged -v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v0.8.2 https://mydomain.com/v1/scripts/IPSUMLETTERSHASH?ISthisAkeyIshouldntSHAREheh

```

So the cloud-config equivalent would be:

```auto
#cloud-config
rancher:
  services:
    register:
      privileged: true
      volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      image: rancher/agent:v0.8.2
      environment:
        - CATTLE_HOST_LABELS='environment=prod&availability=stable'
      command:
      - https://mydomain.com/v1/scripts/IPSUMLETTERSHASH?ISthisAkeyIshouldntSHAREheh

```
