lono user_data
Usage
lono user_data NAME
Description
Generates user_data script for debugging.
Generates user_data scripts in app/user_data
so you can see it for debugging. Let’s say you have a script in app/user_data/bootstrap.sh
. To generate it:
lono user_data bootstrap
Example Output
Script:
#!/bin/bash -exu
<%= extract_scripts(to: "/opt") %>
SCRIPTS=/opt/scripts
$SCRIPTS/install_stuff.sh
Running lono user_data bootstrap
produces:
$ lono user_data bootstrap
Detected app/scripts
Tarballing app/scripts folder to scripts.tgz
=> cd app && dot_clean .
=> cd app && tar -c scripts | gzip -n > scripts.tgz
Tarball created at output/scripts/scripts-93b8b29b.tgz
Generating user_data for 'bootstrap' at ./app/user_data/bootstrap.sh
#!/bin/bash -exu
# Generated from the lono extract_scripts helper.
# Downloads scripts from s3, extract them, and setup.
mkdir -p /opt
aws s3 cp s3://mybucket/path/to/folder/development/scripts/scripts-93b8b29b.tgz /opt/
cd /opt
tar zxf /opt/scripts-93b8b29b.tgz
chown -R ec2-user:ec2-user /opt/scripts
SCRIPTS=/opt/scripts
$SCRIPTS/install_stuff.sh
$
Options
[--clean], [--no-clean] # remove all output files before generating
# Default: true
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend], [--no-pretend] # Run but do not make any changes
-q, [--quiet], [--no-quiet] # Suppress status output
-s, [--skip], [--no-skip] # Skip files that already exist
Edit this page
See a typo or an error? You can improve this page. This website is available on GitHub and contributions are encouraged and welcomed. We love pull requests from you!
- Suggest an edit to this page (here's the contributing guide).
- Open an issue about this page to report a problem.