summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-10-04 12:47:26 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-10-04 12:47:26 +0100
commit23174522be12a56beaff342b97b39bba5b1d6d4f (patch)
tree191ff8eaacfdbf5662da4a5fef6c98deae33f9be
parent9d0b282cc4d2eac1f881ce6ceb311388518672dd (diff)
downloadinfrastructure-23174522be12a56beaff342b97b39bba5b1d6d4f.tar.gz
README.mdwn: Remove documentation for obsolete systems
-rw-r--r--README.mdwn309
1 files changed, 0 insertions, 309 deletions
diff --git a/README.mdwn b/README.mdwn
index 5a85066d..ec221ccd 100644
--- a/README.mdwn
+++ b/README.mdwn
@@ -372,315 +372,6 @@ usual haproxy.cfg file), use 'git grep' to find all of them. You'll need to
update all the relevant config files. We really need some internal DNS system
to avoid this hassle.
-### Database
-
-Baserock infrastructure uses a shared [MariaDB] database. MariaDB was chosen
-because Storyboard only supports MariaDB.
-
-To deploy this system to production:
-
- nova boot database-mariadb \
- --key-name=$keyname \
- --flavor dc1.1x1 \
- --image=$fedora_image_id \
- --nic="net-id=$network_id,v4-fixed-ip=192.168.222.146" \
- --security-groups default,database-mysql \
- --user-data ./baserock-ops-team.cloud-config
- nova volume-create \
- --display-name database-volume \
- --display-description 'Database volume' \
- --volume-type Ceph \
- 100
- nova volume-attach database-mariadb <volume ID> /dev/vdb
-
- ansible-playbook -i hosts baserock_database/image-config.yml
- ansible-playbook -i hosts baserock_database/instance-config.yml
- ansible-playbook -i hosts baserock_database/instance-backup-config.yml
-
-At this point, if you are restoring from a backup, rsync the data across
-from your backup server on the instance, then start the mariadb service and you
-are done.
-
- sudo --preserve-env -- rsync --archive --chown mysql:mysql --hard-links \
- --info=progress2 --partial --sparse \
- root@backupserver:/srv/backup/database/* /var/lib/mysql
- sudo systemctl enable mariadb.service
- sudo systemctl start mariadb.service
-
-NOTE: If you see the following message in the journal:
-
- The datadir located at /var/lib/mysql needs to be upgraded using 'mysql_upgrade' tool. This can be done using the following steps
-
-This is because the backup you are importing is from an older version of
-MariaDB. To fix this, as the message says, you only need to run:
-
- sudo -u mysql mysql_upgrade -u root -p
-
-If you are starting from scratch, you need to prepare the system by adding
-the required users and databases. Run the following playbook, which can
-be altered and rerun whenever you need to add more users or databases, or
-you want to check the database configuration matches what you expect.
-
- ansible -i hosts -m service -a 'name=mariadb enabled=true state=started'
- ansible-playbook -i hosts baserock_database/instance-mariadb-config.yml
-
-The internal IP address of this machine is hardcoded in some places (beyond the
-usual haproxy.cfg file), use 'git grep' to find all of them. You'll need to
-update all the relevant config files. We really need some internal DNS system
-to avoid this hassle.
-
-[MariaDB]: https://www.mariadb.org
-
-### Mail relay
-
-The mail relay is currently a Fedora Cloud 23 image running Exim.
-
-It is configured to only listen on its internal IP. It's not intended to
-receive mail, or relay mail sent by systems outside the baserock.org cloud.
-
-To deploy it:
-
- nova boot mail \
- --key-name $keyname \
- --flavor dc1.1x0 \
- --image $fedora_image_id \
- --nic "net-id=$network_id,v4-fixed-ip=192.168.222.145" \
- --security-groups default,internal-mail-relay \
- --user-data ./baserock-ops-team.cloud-config
-
- ansible-playbook -i hosts baserock_mail/image-config.yml
- ansible-playbook -i hosts baserock_mail/instance-config.yml
-
-The mail relay machine is stateless.
-
-The internal IP address of this machine is hardcoded in some places (beyond the
-usual haproxy.cfg file), use 'git grep' to find all of them. You'll need to
-update all the relevant config files. We really need some internal DNS system
-to avoid this hassle.
-
-### OpenID provider
-
-To deploy this system to production:
-
- vim baserock_openid_provider/baserock_openid_provider/settings.py
-
-Check the DATABASE_HOST IP, and check the other settings against the [Django
-deployment
-checklist](https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/).
-
- nova boot openid.baserock.org \
- --key-name $keyname \
- --flavor dc1.1x1 \
- --image $fedora_image_id \
- --nic "net-id=$network_id,v4-fixed-ip=192.168.222.144" \
- --security-groups default,web-server \
- --user-data ./baserock-ops-team.cloud-config
-
- ansible-playbook -i hosts baserock_openid_provider/image-config.yml
- ansible-playbook -i hosts baserock_openid_provider/instance-config.yml
-
-The baserock_openid_provider system is stateless.
-
-To change Cherokee configuration, it's usually easiest to use the
-cherokee-admin tool in a running instance. SSH in as normal but forward port
-9090 to localhost (pass `-L9090:localhost:9090` to SSH). Backup the old
-/etc/cherokee/cherokee.conf file, then run `cherokee-admin`, and log in using
-the creditials it gives you. After changing the configuration, please update
-the cherokee.conf in infrastructure.git to match the changes `cherokee-admin`
-made.
-
-### Gerrit
-
-To deploy to production, run these commands in a Baserock 'devel'
-or 'build' system.
-
- nova volume-create \
- --display-name gerrit-volume \
- --display-description 'Gerrit volume' \
- --volume-type Ceph \
- 100
-
- git clone git://git.baserock.org/baserock/baserock/infrastructure.git
- cd infrastructure
-
- morph build systems/gerrit-system-x86_64.morph
- morph deploy baserock_gerrit/baserock_gerrit.morph
-
- nova boot gerrit.baserock.org \
- --key-name $keyname \
- --flavor 'dc1.2x4.40' \
- --image baserock_gerrit \
- --nic "net-id=$network_id,v4-fixed-ip=192.168.222.69" \
- --security-groups default,gerrit,git-server,web-server \
- --user-data baserock-ops-team.cloud-config
-
- nova volume-attach gerrit.baserock.org <volume-id> /dev/vdb
-
-Accept the license and download the latest Java Runtime Environment from
-http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html
-
-Accept the license and download the latest Java Cryptography Extensions from
-http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
-
-Save these two files in the baserock_gerrit/ folder. The instance-config.yml
-Ansible playbook will upload them to the new system.
-
- # Don't copy-paste this! Use the Oracle website instead!
- wget --no-cookies --no-check-certificate \
- --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
- "http://download.oracle.com/otn-pub/java/jdk/8u40-b25/server-jre-8u40-linux-x64.tar.gz"
- wget --no-cookies --no-check-certificate \
- --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
- "http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip"
-
- ansible-playbook -i hosts baserock_gerrit/instance-config.yml
-
-For baserock.org Gerrit you will also need to run:
-
- ansible-playbook -i hosts baserock_gerrit/instance-ca-certificate-config.yml
-
-If you are restoring from a backup, rsync the data across from your
-backup server on the instance, then start the gerrit service.
-
- systemctl stop gerrit.service
- rm -r /srv/gerrit/*
-
- rsync --archive --chown gerrit:gerrit --hard-links \
- --info=progress2 --partial --sparse \
- root@backupserver:/srv/backup/gerrit/* /srv/gerrit/
-
- systemctl start gerrit.service
-
-NOTE: If you are restoring a backup from an older version of Gerrit, you
-might need to run some of the following commands to migrate the schemas of the
-database, and also gerrit data (This was needed to move from 2.9.4 to 2.11.4):
-
- java -jar /opt/gerrit/gerrit-2.11.3.war init -d /srv/gerrit
- java -jar /opt/gerrit/gerrit-2.11.3.war reindex -d /srv/gerrit
-
-
-#### Access control
-
-Gerrit should now be up and running and accessible through the web interface.
-By default this is on port 8080. Log into the new Gerrit instance with your
-credentials. Make sure you're the first one to have registered, and you will
-automatically have been added to the Administrators group.
-
-You can add more users into the Administrators group later on using the [gerrit
-set-members] command, or the web interface.
-
-Go to the settings page, 'HTTP Password' and generate a HTTP password for
-yourself. You'll need it in the next step. The password can take a long time to
-appear for some reason, or it might not work at all. Click off the page and
-come back to it and it might suddenly have appeared. I've not investigated why
-this happens.
-
-Generate the SSH keys you need, if you don't have them.
-
- mkdir -p keys
- ssh-keygen -t rsa -b 4096 -C 'lorry@gerrit.baserock.org' -N '' -f keys/lorry-gerrit.key
-
-Now set up the Gerrit access configuration. This Ansible playbook requires a
-couple of non-standard packages.
-
- git clone git://git.baserock.org/delta/python-packages/pygerrit.git
- git clone git://github.com/ssssam/ansible-gerrit
- cd ansible-gerrit && make; cd -
-
- export GERRIT_URL=gerrit web URL
- export GERRIT_ADMIN_USERNAME=your username
- export GERRIT_ADMIN_PASSWORD=your generated HTTP password
- export GERRIT_ADMIN_REPO=ssh://you@gerrit:29418/All-Projects.git
-
- ANSIBLE_LIBRARY=./ansible-gerrit PYTHONPATH=./pygerrit \
- ansible-playbook baserock_gerrit/gerrit-access-config.yml
-
-[gerrit set-members]: https://gerrit-documentation.storage.googleapis.com/Documentation/2.9.4/cmd-set-members.html
-
-#### Mirroring
-
-Run:
-
- ansible-playbook -i hosts baserock_gerrit/instance-mirroring-config.yml
-
-Now clone the Gerrit's lorry-controller configuration repository, commit the
-configuration file to it, and push.
-
- # FIXME: we could use the git_commit_and_push Ansible module for this now,
- # instead of doing it manually.
-
- git clone ssh://$GERRIT_ADMIN_USERNAME@gerrit.baserock.org:29418/local-config/lorries.git /tmp/lorries
- cp baserock_gerrit/lorry-controller.conf /tmp/lorries
- cd /tmp/lorries
- git checkout -b master
- git add .
- git commit -m "Add initial Lorry Controller mirroring configuration"
- git push origin master
- cd -
-
-Now SSH in as 'root' to gerrit.baserock.org, tunnelling the lorry-controller
-webapp's port to your local machine:
-
- ssh -L 12765:localhost:12765 root@gerrit.baserock.org
-
-Visit <http://localhost/1.0/status-html>. You should see the lorry-controller
-status page. Click 'Re-read configuration', if there are any errors in the
-configuration it'll tell you. If not, it should start mirroring stuff from
-your Trove.
-
-Create a Gitano account on the Trove you want to push changes to for the Gerrit
-user. The `instance-config.yml` Ansible playbook will have generated an SSH
-key. Run these commands on the Gerrit instance:
-
- ssh git@git.baserock.org user add gerrit "gerrit.baserock.org" gerrit@baserock.org
- ssh git@git.baserock.org as gerrit sshkey add main < ~gerrit/.ssh/id_rsa.pub
-
-Add the 'gerrit' user to the necessary -writers groups on the Trove, to allow
-the gerrit-replication plugin to push merged changes to 'master' in the Trove.
-
- ssh git@git.baserock.org group adduser baserock-writers gerrit
- ssh git@git.baserock.org group adduser local-config-writers gerrit
-
-Add the host key of the remote trove, to the Gerrit system:
-
- sudo -u gerrit sh -c 'ssh-keyscan git.baserock.org >> ~gerrit/.ssh/known_hosts'
-
-Check the 'gerrit' user's Trove account is working.
-
- sudo -u gerrit ssh git@git.baserock.org whoami
-
-Now enable the gerrit-replication plugin, check that it's now in the list of
-plugins, and manually start a replication cycle. You should see log output from
-the final SSH command showing any errors.
-
- ssh $GERRIT_ADMIN_USERNAME@gerrit.baserock.org -p 29418 gerrit plugin enable replication
- ssh $GERRIT_ADMIN_USERNAME@gerrit.baserock.org -p 29418 gerrit plugin ls
- ssh $GERRIT_ADMIN_USERNAME@gerrit.baserock.org -p 29418 replication start --all --wait
-
-### StoryBoard
-
- ansible-galaxy install -r baserock_storyboard/ansible-galaxy-roles.yaml -p ./baserock_storyboard/roles
-
- nova volume-create \
- --display-name storyboard-volume \
- --display-description 'Storyboard volume' \
- --volume-type Ceph \
- 100
-
- nova boot storyboard.baserock.org \
- --key-name $keyname \
- --flavor 'dc1.1x1.20' \
- --image $ubuntu_image_id \
- --nic "net-id=$network_id,v4-fixed-ip=192.168.222.131" \
- --security-groups default,web-server \
- --user-data baserock-ops-team.cloud-config
-
- nova volume-attach storyboard.baserock.org <volume-id> /dev/vdb
-
- ansible-playbook -i hosts baserock_storyboard/instance-config.yml
- ansible-playbook -i hosts baserock_storyboard/instance-backup-config.yml
- ansible-playbook -i hosts baserock_storyboard/instance-storyboard-config.yml
-
### Trove
To deploy to production, run these commands in a Baserock 'devel'