aws-iot-builder-tools / aws-greengrass-provisioner

Simplifies provisioning Greengrass Cores and building Greengrass Lambda functions
Apache License 2.0
55 stars 15 forks source link

Modularize / Document template.sh.in #243

Open QuinnCiccoretti opened 5 years ago

QuinnCiccoretti commented 5 years ago

I'd like to add some custom scripts to set up devices. (specifically to install docker). Currently I put this code in template.sh.in, but it would be nice if I could separate it into a separate file.

  1. Does the provisioner zip the entire aws-greengrass-provisioner/src/main/resources/shell directory and transfer all the files over to the device?
  2. What environmental variables get written to these .in files? There seems to be env vars for all the scripts, and certificates, but it is unclear where they are set and how to add a new one. It would be pretty cool if I could do something similar to the start script in template:
    if [ "$START" = true ]; then
    ./${START_SCRIPT}
    fi

    with my docker script:

    if [ "$DOCKER" = true ]; then
    ./${DOCKER_INSTALL_SCRIPT}
    fi

    but I don't know how I'd go about this.

timmattison commented 5 years ago

Modularizing the installer script would definitely help some users that have specific configurations they want to consistently build. I'll look into this.