Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added cloud-init recipe for building OpenLDAP source on Ubuntu 12.04 LTS #9

Merged
merged 1 commit into from

1 participant

@hspencer77
Owner

No description provided.

@hspencer77 hspencer77 merged commit 55e16e9 into from
@hspencer77
Owner

Recipe to build OpenLDAP source on Ubuntu 12.04 LTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 54 additions and 0 deletions.
  1. +54 −0 cloud-init/cloud-init-openldap.config
View
54 cloud-init/cloud-init-openldap.config
@@ -0,0 +1,54 @@
+#cloud-config
+apt_update: true
+apt_upgrade: true
+disable_root: true
+cloud_config_modules:
+ - mounts
+ - ssh
+ - [ apt-update-upgrade, always ]
+ - updates-check
+ - runcmd
+packages:
+ - libsasl2-modules-ldap
+ - libsasl2-dev
+ - cyrus-sasl2-dbg
+ - libicu-dev
+ - sasl2-bin
+ - git-core
+ - gcc
+ - libgcc1-dbg
+ - libdb1-compat
+ - linux-libc-dev
+ - libtool
+ - libltdl-dev
+ - libdb4.8-dev
+ - libssl-dev
+ - unixodbc-dev
+ - unixodbc
+ - syslog-ng
+ - less
+ - mlocate
+ - make
+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 /opt/openldap" ]
+ - [ sh, -xc, "mount LABEL=ephemeral0 /opt/openldap" ]
+ - [ sh, -xc, "if [ -z `ls /opt/openldap/*` ]; 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 /opt/openldap/ ]; then mount LABEL=ephemeral0 /opt/openldap; 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" ]
+ - [ apt-get, update ]
+ - [ apt-get, install, -y, --force-yes, euca2ools ]
+ - [ 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 ]
+ - [ sh, -xc, "git clone git://git.openldap.org/openldap.git /root/openldap" ]
+ - [ sh, -xc, "cd /root/openldap; ./configure --prefix=/opt/openldap --enable-debug=yes --enable-syslog --enable-dynamic --enable-slapd --enable-dynacl --enable-cleartext --enable-spasswd --enable-sock --enable-monitor --enable-modules --enable-rewrite --enable-rlookups --enable-bdb --enable-dnssrv=mod --enable-hdb --enable-mdb --enable-monitor --enable-overlays --with-cyrus-sasl --with-threads --with-tls=openssl CC=gcc LDFLAGS=-L/usr/lib/sasl2" ]
+ - [ sh, -xc, "cd /root/openldap; make depend; make install" ]
+mounts:
+ - [ ephemeral0, /opt/openldap, auto, "defaults,noexec" ]
Something went wrong with that request. Please try again.