Problems with injecting user-data from template (AWS)


#1

Hi,

I’m trying to follow the instructions (https://www.spinnaker.io/setup/features/user-data/) on injecting the user-data into the EC2 instances - without success (I cannot see the “udf0” template file to appear in clouddriver’s installation).

I’ve tried e.g. the following:

  • to add the template-file (named udf0) to this location: ~/.hal/default/profiles/clouddriver
  • to add the following into CloudDriver’s config:

halyard@halyard:~/.hal/default/profiles$ cat clouddriver-local.yml
redis:
poll:
intervalSeconds: 15

udf:
udfRoot: /opt/spinnaker/config
defaultLegacyUdf: false

What am I missing here?

Spinnaker-version is the latest, 1.12.3 (running on GKE)
Halyard-version is 1.15.0-19


#2

Hey @iniinikoski

You’ll need to setup the directory to look like this.

.hal/
├── config    
└── default/
    ├── profiles/ # where you store custom
    │   └── clouddriver/
    │       └── udf/
    │         └── udf0       # default armory udf0 file https://gist.github.com/d904109996a33ef047aea64deae9c05a
    │   └── clouddriver-local.yml  # this will get copied direct into clouddriver container
    └── staging/           # `hal deploy generate` or `hal deploy apply` creates yamls here to be moved to the box

You’ll also need to add this into your clouddriver-local.yml

udf:
  enabled: true
  udfRoot: /opt/clouddriver/config/udf
  defaultLegacyUdf: false

You can read more about user data files here: https://www.spinnaker.io/setup/features/user-data/


#3

Thanks @kevinawoo. As we are using Halyard - I think the problem lies there - as it looks like Halyard does not populate the udf part under Clouddriver, whatever I do…

> halyard@halyard:~$ find . -type f -name udf0
> ./.hal/default/profiles/clouddriver/udf/udf0

And from the Clouddriver-container:

bash-4.4$ pwd
/opt
bash-4.4$ find . -name udf0
<empty>

I was also missing the “enabled: true” from the clouddriver-local - as this is not mentioned in official documentation.

I’ll probably create a Halyard-ticket about this one.


#4

Ticket is in: https://github.com/spinnaker/spinnaker/issues/4058