This repo includes the server initialization files for the 'https://demo6.dspace.org' server.
This includes the following:
cloud-init.yaml: a cloud-init Config data file (to be passed via userdata) to initialize server in EC2Puppetfile: a librarian-puppet config file used to install all necessary Puppet modulesmanifests/site.pp: the actual Puppet script to run via 'puppet apply'- Basic configs required for Puppet
- Spin up a new Ubuntu 16.04 LTS (64-bit, HVM Virtualization, EBS-SSD boot), e.g. ami-e3c3b8f4 from Ubuntu's Amazon EC2 AMI Locator
- Select instance size (currently using 'm3.medium' for demo.dspace.org)
- Upload the included 'cloud-init.yaml' as "User Data"
- Storage: Update to at least 75GB storage for ROOT
- Launch the instance
- Sit back and wait while 'cloud-init' & Puppet does all the hard work for you.
- The entire process may take ~15 mins
- If you want to check on the status:
- SSH to the server
tail -f /var/log/cloud-init-output.log- Once it reports
System boot (via cloud-init) is COMPLETE, then the server is done setting itself up.
All of the hard work is taken care of by cloud-init (and Puppet).
Here's what the cloud-init.yaml does for you:
- Sets the server hostname & FQDN
- Adds all necessary Apt repositories
- Runs 'apt-get update' and 'apt-get upgrade' to ensure all is up-to-date (reboots if needed)
- Installs all necessary software on server (e.g. Puppet, librarian-puppet, Git)
- Clones this 'puppet-dspace-demo' GitHub repo to server (at
/etc/puppet/) - Runs 'librarian-puppet' to install any Puppet module dependencies (specified in Puppetfile)
- Runs
puppet apply /etc/puppet/manifests/site.ppto actually install Postgres, Tomcat, Apache and DSpace (using the Puppet modules for each)
Note: all actions taken by 'cloud-init' are logged to /var/log/cloud-init.log. The output/results are logged to /var/log/cloud-init-output.log.
The Puppet script that does all the setup is manifests/site.pp.
Here's what it currently does:
- Setup Ubuntu unattended_upgrades (via puppet-unattended_upgrades module)
- Setup DSpace, including all prerequisites (via our separate puppet-dspace module). This includes setting up all of the following:
- PostgreSQL database (via puppetlabs-postgresql module)
- Tomcat (via puppetlabs-tomcat module)
- Apache web server (via puppetlabs-apache module), communicates with Tomcat via AJP
- 'dspace' OS user account (which is the owner of DSpace installation)
- Setup splash page (homepage of http://demo.dspace.org), by checking out/installing the https://github.com/DSpace/demo.dspace.org project
- Also includes the useful scripts / cron jobs from that project
- 'kompewter' IRC bot (from https://github.com/DSpace-Labs/kompewter)
- Setup custom Message of the Day for server and other basic files
NOTE: Currently this script downloads AIPs from a private S3 location to the ~dspace/AIP-restore folder. If you wish to copy/clone this script for your own purposes, you can skip this step, or create your own content that looks something like this:
~dspace/AIP-restore/[email protected](Site AIP corresponding to 10673/0 handle)COMMUNITY@[handle].zip(one or more Community AIPs using 10673 handle prefix)COLLECTION@[handle].zip(one or more Collection AIPs using 10673 handle prefix)ITEM@[handle].zip(one or more ITEM AIPs using 10673 handle prefix)
- A restore script is installed to
~/bin/reset-dspace-content(under the 'dspace' OS user account). At this time, it must be manually run after DSpace is installed (it is not automated).
This work is licensed under the DSpace BSD 3-Clause License, which is just a standard BSD 3-Clause License.