Let's set up Camlistore on a Linux server, with blobs stored in s3. This seems to be the currently best-supported option for "cloud" deployment.
This is meant as a supplement to the official server config doc. Read through both docs before you start.
This blog post is also recommended reading.
I've posted my config files for reference, but they will be created the first time you run
camlistored (for the server) and
camput init (for the client) so don't copy them.
- Build on server
- Configure S3 bucket
- Configure client on laptop
- Ensure camlistored starts on server start
Get Camlistored running on your server
- Go 1.1+. For Ubuntu, you may need to upgrade, use a PPA, or use godeb to build your own packages.
- Run the server with
bin/camlistored(this will create your initial server config)
~/.config/camlistore/server-config.json(there is also a
/setupURL for editing the config, but it's only accessible from
localhost, so you'd need to use an SSH port forward:
ssh -L 3179:localhost:3179 firstname.lastname@example.org)
Follow the Ubuntu Docs to create a self signed certificate, and then put them in your server config.
Set up s3
- Create a bucket
- Create a IAM user
- Copy Creds for config
- Use the grant policies from this article. Might be overly permissive.
Make sure camlistored starts when your server starts. On Ubuntu, you need an Upstart job config like camlistored.conf.
camput init and edit
vim ~/.config/camlistore/client-config.json to add a new
auth string copied from server config.
You will need to add the SSL cert from the server to a "trustedCerts" key. Try to camput something and you will see a helpful error message about this.
- Import your stuff! Use
cammount ~/Storeand then
mkdir ~/Store/roots/Notesto start.
- Run multiple indexes/blobstores (laptop, beaglebone in closet)
- Serve a website right out of camlistore using a publish permanode and go templates