← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lgp171188/launchpad:launchpad-scripts-extra-volume-manual-steps into launchpad:master

 

Guruprasad has proposed merging ~lgp171188/launchpad:launchpad-scripts-extra-volume-manual-steps into launchpad:master.

Commit message:
charm/launchpad-scripts: Document the manual steps to setup a volume

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/447204
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:launchpad-scripts-extra-volume-manual-steps into launchpad:master.
diff --git a/charm/launchpad-scripts/README.md b/charm/launchpad-scripts/README.md
index 257a0f7..a7153af 100644
--- a/charm/launchpad-scripts/README.md
+++ b/charm/launchpad-scripts/README.md
@@ -9,6 +9,48 @@ You will need the following relations:
     juju relate launchpad-scripts memcached
     juju relate launchpad-scripts rabbitmq-server
 
+This charm installs a cron job to automatically synchronize the Debian bugs
+database to the local disk. Since the Debian bugs database is ~150 GiB
+in size at the time of writing, it is recommended to provision the unit's
+storage accordingly.
+
+In Canonical's deployment of this charm, an additional volume is provisioned
+and mounted at the destination directory of this synchronization cron job.
+Below are the instructions for doing so.
+
+* Create a Ceph volume of at least 300 GiB in size for storing the Debian bugs
+  database. Below is an example command to create this volume in the
+  `qastaging` environment.
+
+      openstack volume create --size 300 \
+          --description 'Debian bugs database data - lp/qastaging' \
+          lp-qastaging-debian-bugs-data
+
+* Attach this Ceph volume to the `launchpad-scripts` using the following
+  command. The instance ID of the `launchpad-scripts` unit can be found
+  from the output of the `juju status` command.
+
+      openstack server add volume <instance id> lp-qastaging-debian-bugs-data
+
+* Log in to the `launchpad-scripts` unit and perform the following steps.
+
+* Create a filesystem on the new volume using `sudo mkfs.ext4 /dev/vdb`. Do
+  check and verify that this device node matches the new volume.
+
+* Create the `/srv/launchpad/var/debbugs-mirror` directory, if it does not
+  exist already. Here, `/srv/launchpad/var` corresponds to the `var_dir`
+  configuration variable.
+
+* Add `/dev/vdb /srv/launchpad/var/debbugs-mirror ext4 defaults 0 2` to
+  `/etc/fstab`.
+
+* Mount the new volume using `sudo mount /srv/launchpad/var/debbugs-mirror`.
+
+* Set the correct permissions on the new volume using the following commands.
+
+      sudo chown launchpad: /srv/launchpad/var/debbugs-mirror
+      sudo chmod 775 /srv/launchpad/var/debbugs-mirror
+
 ## Maintenance actions
 
 To stop Celery workers and `number-cruncher` (perhaps in preparation for a