CMS used by the ONS website
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
ci
content
zebedee-cli
zebedee-cms
zebedee-reader
.gitignore
Dockerfile
Dockerfile.concourse
README.md
clear-database.sh
cli.sh
export-default-env-vars.sh
pom.xml
run-reader.sh
run.sh
update-database.sh
zebedee.nomad

README.md

Zebedee

NOTE: We are currently in the process of deprecating this service due to:

  • Performance limitations
  • Maintainability issues
  • Inability to scale effectively
  • Limitations of the underlying HTTP framework

Zebedee is the CMS used by the ONS website and the internal website publishing system. It is a JSON API and does not have a user interface. It comes in 2 flavours:

zebedee-reader

Zebedee-reader is read-only. It's used by Babbage (the public facing web frontend of the ONS website) it returns the published site content as JSON.

zebedee-cms

Zebedee-cms is an extension of zebedee-reader. It's used by Florence and provides API endpoints for managing content, users, teams and publishing collecions. Zebedee-CMS is not public facing and requires authentication for the majority functionality. Pre-release content is encrypted and requries the appropriate permissions to be able to access it.

Prerequisites

  • git
  • Java 8
  • Maven
  • Docker

As mentioned Zebedee is a JSON API, and does not have a user interface. The quickest and easiest way to use it is to set up a local copy of the "publishing" stack. Clone and set up the following projects following the README instructions in each repo:

Getting started


If you encounter any issues or notice anything missing from this guide please update/add any missing/helpful information and open a PR.

Much appreciated. The Dev team


NOTE: The following set guide will set up Zebedee in "CMS" mode as this is typically how the devlopers will run the stack locally.

Getting the code

git clone git@github.com:ONSdigital/zebedee.git

Database...

Zebedee isn't backed by a database instead it uses a file system to store json files on disk ***. As a result it requires a specific directory structure in order to function correctly.


*** We know this is a terrible idea - but in our defence this is a legacy hangover and we are actively working towards deprecating it.


To save yourself some pain you can use the dp-zebedee-utils/content tool to create the required directory structure and populate the CMS with some "default content" - follow the steps in the README before going any further.

Once the script has run successfully copy the generated script from dp-zebedee-utils/content/generated/run-cms.sh into the root dir of your Zebedee project. This bash script compiles and runs Zebedee setting typical dev default configuration and uses the content / directory structure generated by dp-zebedee-utils.

You may be required to make the bash script an executable before you can run it. If so run:

sudo chmod +x run-cms.sh
<Enter your password when prompted>

Running the publishing stack

In order to use Zebedee you will need to have the following other project running:

  • Florence
  • Babbage
  • Sixteens
  • dp-compose

Follow the steps in the README of each project.

Running zebedee

./run-cms.sh

Assuming Zebedee has started without error head to Florence login and login with the default account:

email: florence@magicroundabout.ons.gov.uk
password: Doug4l
  • If it's the first time logging in you will be prompted to change the password for that user.
  • On the home screen create a new collection.
  • Click Create/edit on the Collection Details screen.

If everything is working correctly you should now see the the ONS website displayed in the right hand pane. Congratulations 🎉! Advanced to GO collect £200 💵

Otherwise 🎻 kindly ask someone from the dev team to help troubleshoot.