Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (39 sloc) 2.41 KB
#cloud-config
apt_update: true
apt_upgrade: true
disable_root: true
package_reboot_if_required: true
packages:
- less
- bind9utils
- dnsutils
- mlocate
cloud_config_modules:
- ssh
- [ apt-update-upgrade, always ]
- updates-check
- runcmd
runcmd:
- [ sh, -xc, "if [ -b /dev/sda2 ]; then tune2fs -L ephemeral0 /dev/sda2;elif [ -b /dev/vda2 ]; then tune2fs -L ephemeral0 /dev/vda2;elif [ -b /dev/xvda2 ]; then tune2fs -L ephemeral0 /dev/xvda2;fi" ]
- [ sh, -xc, "mkdir -p /var/lib/neo4j" ]
- [ sh, -xc, "mount LABEL=ephemeral0 /var/lib/neo4j" ]
- [ sh, -xc, "if [ -z `ls /var/lib/neo4j/*` ]; then sed --in-place '$ iMETA_HOSTNAME=`curl -s http://169.254.169.254/latest/meta-data/local-hostname`\\nMETA_IP=`curl -s http://169.254.169.254/latest/meta-data/local-ipv4`\\necho ${META_IP} ${META_HOSTNAME} >> /etc/hosts; hostname ${META_HOSTNAME}; sysctl -w kernel.hostname=${META_HOSTNAME}\\nif [ -d /var/lib/neo4j/ ]; then mount LABEL=ephemeral0 /var/lib/neo4j; service neo4j-service restart; fi' /etc/rc.local; fi" ]
- [ sh, -xc, "META_HOSTNAME=`curl -s http://169.254.169.254/latest/meta-data/local-hostname`; META_IP=`curl -s http://169.254.169.254/latest/meta-data/local-ipv4`; echo ${META_IP} ${META_HOSTNAME} >> /etc/hosts" ]
- [ sh, -xc, "META_HOSTNAME=`curl -s http://169.254.169.254/latest/meta-data/local-hostname`; hostname ${META_HOSTNAME}; sysctl -w kernel.hostname=${META_HOSTNAME}" ]
- [ sh, -xc, "wget -O c1240596-eucalyptus-release-key.pub http://www.eucalyptus.com/sites/all/files/c1240596-eucalyptus-release-key.pub" ]
- [ apt-key, add, c1240596-eucalyptus-release-key.pub ]
- [ sh, -xc, "echo 'deb http://downloads.eucalyptus.com/software/euca2ools/2.1/ubuntu precise main' > /etc/apt/sources.list.d/euca2ools.list" ]
- [ sh, -xc, "echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j.list" ]
- [ apt-get, update ]
- [ apt-get, install, -y, --force-yes, euca2ools ]
- [ apt-get, install, -y, --force-yes, neo4j ]
- [ sh, -xc, "sed --in-place 's/#org.neo4j.server.webserver.address=0.0.0.0/org.neo4j.server.webserver.address=0.0.0.0/' /etc/neo4j/neo4j-server.properties" ]
- [ sh, -xc, "service neo4j-service restart" ]
- [ sh, -xc, "export LANGUAGE=en_US.UTF-8" ]
- [ sh, -xc, "export LANG=en_US.UTF-8" ]
- [ sh, -xc, "export LC_ALL=en_US.UTF-8" ]
- [ locale-gen, en_US.UTF-8 ]
- [ dpkg-reconfigure, locales ]
- [ updatedb ]
mounts:
- [ ephemeral0, /var/lib/neo4j, auto, "defaults,noexec" ]
You can’t perform that action at this time.