summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-07-02 18:43:54 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-07-02 18:43:54 -0700
commit115e53d3a9114326cb7c07e4b95947b87d9e2d02 (patch)
treefda9f2ac9187e9f114b9f0dbdc527f499242a9cb /tests
parent37aa678a39d8ac568351ce754d202c1069034d1c (diff)
downloadvyos-cloud-init-115e53d3a9114326cb7c07e4b95947b87d9e2d02.tar.gz
vyos-cloud-init-115e53d3a9114326cb7c07e4b95947b87d9e2d02.zip
Add a sample yaml config to be used for testing.
Diffstat (limited to 'tests')
-rw-r--r--tests/configs/sample1.yaml53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/configs/sample1.yaml b/tests/configs/sample1.yaml
new file mode 100644
index 00000000..24e874ee
--- /dev/null
+++ b/tests/configs/sample1.yaml
@@ -0,0 +1,53 @@
+#cloud-config
+#apt_update: false
+#apt_upgrade: true
+packages: [ bzr, pastebinit, ubuntu-dev-tools, ccache, bzr-builddeb, vim-nox, git-core, lftp ]
+
+#apt_sources:
+# - source: ppa:smoser/ppa
+
+#disable_root: False
+
+# mounts:
+# - [ ephemeral0, /mnt ]
+# - [ swap, none, swap, sw, 0, 0 ]
+
+ssh_import_id: [smoser ]
+
+#!/bin/sh
+
+output: {all: '| tee -a /var/log/cloud-init-output.log'}
+
+sm_misc:
+ - &user_setup |
+ set -x; exec > ~/user_setup.log 2>&1
+ echo "starting at $(date -R)"
+ echo "set -o vi" >> ~/.bashrc
+ cat >> ~/.profile <<"EOF"
+ export EDITOR=vi
+ export DEB_BUILD_OPTIONS=parallel=4
+ export PATH=/usr/lib/ccache:$PATH
+ EOF
+
+ mkdir ~/bin
+ chmod 755 ~/bin
+ cat > ~/bin/mdebuild <<"EOF"
+ #!/bin/sh
+ exec debuild --prepend-path /usr/lib/ccache "$@"
+ EOF
+ chmod 755 ~/bin/*
+
+ #byobu-launcher-install
+ byobu-ctrl-a screen 2>&1 || :
+
+ echo "pinging 8.8.8.8"
+ ping -c 4 8.8.8.8
+
+runcmd:
+ - [ sudo, -Hu, ubuntu, sh, -c, '[ -e /var/log/cloud-init.log ] || exit 0; grep "cloud-init.*running" /var/log/cloud-init.log > ~/runcmd.log' ]
+ - [ sudo, -Hu, ubuntu, sh, -c, 'read up sleep < /proc/uptime; echo $(date): runcmd up at $up | tee -a ~/runcmd.log' ]
+ - [ sudo, -Hu, ubuntu, sh, -c, *user_setup ]
+
+
+byobu_by_default: user
+output: {all: '| tee -a /var/log/cloud-init-output.log'}