Commit 480bb482 authored by Aral Balkan's avatar Aral Balkan
Browse files

Updated the readme with the new name and with updated production environment setup instructions.

parent 0321bae0
# Blockdown Builder
# Better Builder
Builds the blockdown data from the blockdown content.
Builds the data for the Better site and app using authored Better content in Blockdown format.
## Development
./install
To use, run:
## Usage
To generate the data, run:
./dev
## Usage
To see the generated site, visit `http://localhost:3000`
To see the site, visit `http://localhost:3000`
To see the generated app data, run the [Better app](https://source.ind.ie/better/app) in the iOS Simulator.
To update (locally):
To update the generated data (locally):
1. Make a change to a Blockdown file in *~/ind.ie.blockdown-builder/content/*
1. Make a change to a Blockdown format file in your local working copy of the content repository (*~/better.fyi/builder/content/*)
2. `git commit -am "Your change"`
3. `git push`
At this point, your commit will simulate the Gitlab web hook that the production environment uses and trigger the Blockdown build process. That, in turn, will push to the local site.
At this point, your commit will simulate the Gitlab web hook that the production environment uses and trigger the Better build process. That, in turn, will push to the local site.
Visit `http://localhost:3000` to see the updated site and *~/ind.ie.blockdown-builder/site-local/blockerList.json* for the updated WebKit blocker list.
Visit `http://localhost:3000` to see the updated site and *~/better.fyi/builder/site-local/site/blockerList.json* for the updated WebKit blocker list.
## Production
(I’m sorry there isn’t a more automated process at the moment. Configuration of the deployment environment involves the manual set up and configuration of a number of servers and Git repositories at the moment.)
To run Better in production, you will need to set up three servers:
1. [Builder Server](#builder-server)
2. [Data Server](#data-server)
3. [Web Server](#web-server)
Each of the production servers has an automated installation script where you can also customise the installation based on your own domain, etc.
**Important:** you do not need to set up a live production environment in order to test Better, develop on it, and develop new content for it. To carry out those tasks, simply install the builder locally using the `./install` script to set up a fully offline local environment that simulates the production environment described below. (You will need Internet access only during the installation process so that the installation script can clone the initial repositories from source.ind.ie.)
1. Set up server with Dokku.
You only need to set up a production environment if you want to provide your own hosted version of Better. While this is possible, we encourage you to contribute to the main project whenever possible.
2. Copy `config.coffee` into `~/ind.ie.blockdown-builder` (`/root/ind.ie.blockdown-builder/`) and configure it.
### Common steps
3. In the folder from Step 2, above, `git clone git@source.ind.ie:blockdown/content.git`
Repeat the following steps for all three installations (to get a plain vanilla OpenStack Ubuntu installation to the state where you can clone the installation script):
4. ./deploy
1. Commission an Ubuntu 14.04 LTS server from an OpenStack provider (tested with CloudScale.ch)
2. `ssh ubuntu@builder.yourdoma.in`
3. `sudo apt-get update && sudo apt-get install git`
5. Create the volumes:
### Builder Server
dokku docker-options:add blockdown-builder.ind.ie run "-v /root/ind.ie.blockdown-builder:/app/ind.ie.blockdown-builder"
To set up your own version of *builder.better.fyi*:
6. Clone the data and theme repositories (you must first create the data folders, initialise with a basic readme.md):
i. `cd ~/ind.ie.blockdown-builder/`
ii. `git clone git@source.ind.ie:blockdown/data-for-apps.git`
ii. `git clone git@source.ind.ie:blockdown/data-for-site.git`
iii. `git clone git@source.ind.ie:blockdown/theme-for-app-data.git`
iv. `git clone git@source.ind.ie:blockdown/theme-for-site-data.git`
v. `git clone git@source.ind.ie:blockdown/content.git`
0. Folow the instructions under [common steps](#common-steps), above.
1. `git clone git@source.ind.ie:better/builder-server-setup.git`
2. `cd builder-server-setup`
3. `./install`
7. In the data-for-site repository: `git remote add site git@blockdown-site.ind.ie:data.git`
### Data Server
8. Set up post-push and post-merge webhooks on Gitlab for the Content, Theme-For-Site-Data, and Theme-For-App-Data repositories to point to `https://url/for/your/installation/build/(token-from-config.coffee)`
To set up your own version of *data.better.fyi*:
9. Add your ssh key for the Blockdown repositories to `~/ind.ie.blockdown-builder/ssh` as `id_rsa` and `id_rsa.pub`.
0. Folow the instructions under [common steps](#common-steps), above.
1. `git clone git@source.ind.ie:better/data-server-setup.git`
2. `cd data-server-setup`
3. `./install`
### Web Server
# Site deployment
To set up your own version of *(www.)better.fyi*:
For blockdown-site.ind.ie:
0. Folow the instructions under [common steps](#common-steps), above.
1. `git clone git@source.ind.ie:better/web-server-setup.git`
2. `cd web-server-setup`
3. `./install`
1. Create a git account.
2. Add the blockdown-builder.ind.ie SSH keys to the account’s `~/.ssh` folder.
3. In ~, `git clone --bare git@source.ind.ie:blockdown/data-for-site.git data.git`
4. In ~, `git clone data.git site`
5. From blockdown-builder.ind.ie, make sure you run Step 7, above to add data.git as a remote.
6. Make sure that the post-receive hook is in /home/git/data.git/hooks (see Site repository)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment