Deploying CIRCLE ================ This tutorial describes the installation of a production environment. To have a fully working environment, you have to set up the other components as well. The full procedure is included in the :doc:`Puppet recipes ` available for CIRCLE Cloud. This component should normally deployed to a single head node. This is the web-based entry point to the end users, and also the manager of the compute and storage nodes. Preparation ----------- To get the project running, launch a new Ubuntu 14.04 machine, and log in to it over SSH. .. warning:: If the first character of the hostname should not be a digit, because RabbitMQ won't work with it. The machine should have an :abbr:`fqdn (fully qualified domain name)`, which shoud be correctly printed by :kbd:`hostname -f`. You can achieve this with an IP address (e.g. 127.0.1.1) in :file:`/etc/hosts` having the short hostname as first, and the fqdn as second alias). Setting up required software ---------------------------- Update the package lists, and install the required system software:: sudo apt-get update sudo apt-get install --yes virtualenvwrapper postgresql git \ python-pip rabbitmq-server libpq-dev python-dev ntp memcached \ libmemcached-dev gettext wget pwgen nginx npm nodejs-legacy sudo npm -g install bower less yuglify Set up *PostgreSQL* to listen on localhost and restart it:: sudo sed -i /etc/postgresql/9.1/main/postgresql.conf -e '/#listen_addresses/ s/^#//' sudo /etc/init.d/postgresql restart Also, create a new database and user:: pwgen 12 >pgpw sudo -u postgres createuser -S -D -R circle sudo -u postgres psql <<<"ALTER USER circle WITH PASSWORD '$(cat pgpw)';" sudo -u postgres createdb circle -O circle Configure RabbitMQ: remove the guest user, add virtual host and user with proper permissions:: pwgen 12 >rmqpw sudo rabbitmqctl delete_user guest sudo rabbitmqctl add_vhost circle sudo rabbitmqctl add_user cloud $(cat rmqpw) sudo rabbitmqctl set_permissions -p circle cloud '.*' '.*' '.*' Set up nginx to serve the CIRCLE portal. :: sudo tee /etc/nginx/conf.d/default.conf <>/home/cloud/.virtualenvs/circle/bin/postactivate <