summaryrefslogtreecommitdiff
path: root/doc/tutorials
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tutorials')
-rw-r--r--doc/tutorials/configure-provider.md31
-rw-r--r--doc/tutorials/en.haml5
-rw-r--r--doc/tutorials/quick-start.md14
-rw-r--r--doc/tutorials/single-node-email.md (renamed from doc/tutorials/single-node.md)145
4 files changed, 80 insertions, 115 deletions
diff --git a/doc/tutorials/configure-provider.md b/doc/tutorials/configure-provider.md
new file mode 100644
index 00000000..969d541b
--- /dev/null
+++ b/doc/tutorials/configure-provider.md
@@ -0,0 +1,31 @@
+@title = 'Configure provider tutorial'
+@nav_title = 'Configure Provider'
+@summary = 'Explore how to configure your provider after the initial setup'
+
+
+Edit provider.json configuration
+--------------------------------------
+
+There are a few required settings in provider.json. At a minimum, you must have:
+
+ {
+ "domain": "example.org",
+ "name": "Example",
+ "contacts": {
+ "default": "email1@example.org"
+ }
+ }
+
+For a full list of possible settings, you can use `leap inspect` to see how provider.json is evaluated after including the inherited defaults:
+
+ $ leap inspect provider.json
+
+
+Examine Certs
+=============
+
+To see details about the keys and certs that the prior two commands created, you can use `leap inspect` like so:
+
+ $ leap inspect files/ca/ca.crt
+
+NOTE: the files `files/ca/*.key` are extremely sensitive and must be carefully protected. The other key files are much less sensitive and can simply be regenerated if needed.
diff --git a/doc/tutorials/en.haml b/doc/tutorials/en.haml
index 72a8a1fc..1c73fc0f 100644
--- a/doc/tutorials/en.haml
+++ b/doc/tutorials/en.haml
@@ -1,5 +1,4 @@
-- @title = "Tutorials"
-
-%h1.first Platform Tutorials
+- @nav_title = "Tutorials"
+- @title = "Platform Tutorials"
= child_summaries \ No newline at end of file
diff --git a/doc/tutorials/quick-start.md b/doc/tutorials/quick-start.md
index f45574df..a92cc9da 100644
--- a/doc/tutorials/quick-start.md
+++ b/doc/tutorials/quick-start.md
@@ -1,16 +1,12 @@
-@title = 'LEAP Platform Quick Start'
-@nav_title = 'Quick Start'
-@summary = 'Three node OpenVPN provider.'
+@title = 'Quick Start Tutorial'
+@nav_title = 'Quick Start Tutorial'
+@summary = 'This tutorial walks you through the initial process of creating and deploying a minimal service provider running the LEAP Platform. This Quick Start guide will guide you through building a three node OpenVPN provider.'
-Quick Start
-===========
-
-This tutorial walks you through the initial process of creating and deploying a minimal service provider running the [LEAP platform](platform). This Quick Start guide will guide you through building a three node OpenVPN provider.
Our goal
------------------
-We are going to create a minimal LEAP provider offering OpenVPN service. This basic setup can be expanded by adding more OpenVPN nodes to increase capacity, or more webapp and couchdb nodes to increase availability (performance wise, a single couchdb and a single webapp are more than enough for most usage, since they are only lightly used, but you might want redundancy). Please note: currently it is not possible to safely add additional couchdb nodes at a later point. They should all be added in the beginning, so please consider carefully if you would like more before proceeding.
+We are going to create a minimal LEAP provider offering OpenVPN service. This basic setup can be expanded by adding more OpenVPN nodes to increase capacity or geographical diversity, or more webapp nodes to increase availability (at the moment, a single couchdb and single webapp server are all that is supported, and performance wise, are more than enough for most usage, since they are only lightly used). At the moment, we strongly advise only have one couchdb server for stability purposes.
Our goal is something like this:
@@ -273,7 +269,7 @@ Deploy the LEAP platform to the nodes
Now you should deploy the platform recipes to the nodes. [Deployment can take a while to run](http://xkcd.com/303/), especially on the first run, as it needs to update the packages on the new machine.
-*Important notes:* currently nodes must be deployed in a certain order. The underlying couch database node(s) must be deployed first, and then all other nodes. Also you need to configure and deploy all of the couchdb nodes that you plan to use at this time, as currently you cannot add more of them later later ([See](https://leap.se/es/docs/platform/known-issues#CouchDB.Sync)).
+*Important notes:* currently nodes must be deployed in a certain order. The underlying couch database node(s) must be deployed first, and then all other nodes.
$ leap deploy cheetah
diff --git a/doc/tutorials/single-node.md b/doc/tutorials/single-node-email.md
index 02d35c7a..872d1da8 100644
--- a/doc/tutorials/single-node.md
+++ b/doc/tutorials/single-node-email.md
@@ -1,5 +1,5 @@
-@title = 'Single node tutorial'
-@nav_title = 'Single node'
+@title = 'Single node email tutorial'
+@nav_title = 'Single node email'
@summary = 'A single node email provider.'
Quick Start - Single node setup
@@ -26,13 +26,13 @@ Requirements
In order to complete this Quick Start, you will need a few things:
-* You will need one real or paravirtualized virtual machine (Vagrant, KVM, Xen, Openstack, Amazon, …) that have a basic Debian Stable installed.
-* You should be able to SSH into them remotely, and know their root password, IP addresses and their SSH host keys
-* The ability to create/modify DNS entries for your domain is preferable, but not needed. If you don't have access to DNS, you can workaround this by modifying your local resolver, i.e. editing `/etc/hosts`.
-* You need to be aware that this process will make changes to your systems, so please be sure that these machines are a basic install with nothing configured or running for other purposes
+* You will need `one real or paravirtualized virtual machine` (Vagrant, KVM, Xen, Openstack, Amazon, …) that have a basic Debian Stable installed.
+* You should be able to `SSH into them` remotely, and know their root password, IP addresses and their SSH host keys
+* The ability to `create/modify DNS entries` for your domain is preferable, but not needed. If you don't have access to DNS, you can workaround this by modifying your local resolver, i.e. editing `/etc/hosts`.
+* You need to be aware that this process will make changes to your machines, so please be sure that these machines are a basic install with nothing configured or running for other purposes
* Your machines will need to be connected to the internet, and not behind a restrictive firewall.
-* You should work locally on your laptop/workstation (one that you trust and that is ideally full-disk encrypted) while going through this guide. This is important because the provider configurations you are creating contain sensitive data that should not reside on a remote machine. The leap cli utility will login to your servers and configure the services.
-* You should do everything described below as an unprivileged user, and only run those commands as root that are noted with *sudo* in front of them. Other than those commands, there is no need for privileged access to your machine, and in fact things may not work correctly.
+* You should `work locally on your laptop/workstation` (one that you trust and that is ideally full-disk encrypted) while going through this guide. This is important because the provider configurations you are creating contain sensitive data that should not reside on a remote machine. The leap cli utility will login to your servers and configure the services.
+* You should do everything described below as an `unprivileged user`, and only run those commands as root that are noted with *sudo* in front of them. Other than those commands, there is no need for privileged access to your machine, and in fact things may not work correctly.
All the commands in this tutorial are run on your sysadmin machine. In order to complete the tutorial, the sysadmin will do the following:
@@ -40,9 +40,9 @@ All the commands in this tutorial are run on your sysadmin machine. In order to
* Install the LEAP command-line utility
* Check out the LEAP platform
* Create a provider and its certificates
-* Setup the provider's nodes and the services that will reside on those nodes
-* Initialize the nodes
-* Deploy the LEAP platform to the nodes
+* Setup the provider's node and the services that will reside on it
+* Initialize the node
+* Deploy the LEAP platform to the node
* Test that things worked correctly
* Some additional commands
@@ -63,11 +63,10 @@ Install core prerequisites:
$ sudo apt-get install git ruby ruby-dev rsync openssh-client openssl rake make bzip2
-<!--
*Mac OS*
-1. Install rubygems from https://rubygems.org/pages/download (unless the `gem` command is already installed).
--->
+Install rubygems from https://rubygems.org/pages/download (unless the `gem` command is already installed).
+
NOTE: leap_cli should work with ruby1.8, but has only been tested using ruby1.9.
@@ -75,51 +74,23 @@ NOTE: leap_cli should work with ruby1.8, but has only been tested using ruby1.9.
Install the LEAP command-line utility
-------------------------------------------------
-Install the `leap` command from rubygems.org:
+Install the LEAP command-line utility (leap_cli) from rubygems.org:
$ sudo gem install leap_cli
-Alternately, you can install `leap` from source:
-
- $ git clone https://leap.se/git/leap_cli
- $ cd leap_cli
- $ rake build
- $ sudo rake install
-
-You can also install from source as an unprivileged user, if you want. For example, instead of `sudo rake install` you can do something like this:
-
- $ rake install
- # watch out for the directory leap is installed to, then i.e.
- $ sudo ln -s ~/.gem/ruby/1.9.1/bin/leap /usr/local/bin/leap
+Alternately, you can install `leap_cli` from source, please refer to https://leap.se/git/leap_cli/README.md.
-With either `rake install` or `sudo rake install`, you can use now /usr/local/bin/leap, which in most cases will be in your $PATH.
-
-If you have successfully installed the `leap` command, then you should be able to do the following:
+If you have successfully installed `leap_cli`, then you should be able to do the following:
$ leap --help
This will list the command-line help options. If you receive an error when doing this, please read through the README.md in the `leap_cli` source to try and resolve any problems before going forwards.
-Check out the platform
---------------------------
-
-The LEAP Platform is a series of puppet recipes and modules that will be used to configure your provider. You will need a local copy of the platform that will be used to setup your nodes and manage your services. To begin with, you will not need to modify the LEAP Platform.
-Until we have a up to date stable release we recommend using the `develop` branch of the platform and leap_cli for all features of LEAP.
-
-First we'll create a directory for LEAP things, and then we'll check out the platform code and initalize the modules:
-
- $ mkdir ~/leap
- $ cd ~/leap
- $ git clone https://leap.se/git/leap_platform.git
- $ cd leap_platform
- $ git checkout develop
- $ git submodule sync; git submodule update --init
-
Provider Setup
==============
-A provider instance is a directory tree, usually stored in git, that contains everything you need to manage an infrastructure for a service provider. In this case, we create one for example.org and call the instance directory 'example'.
+A provider instance is a directory tree that contains everything you need to manage an infrastructure for a service provider. In this case, we create one for example.org and call the instance directory 'example'.
$ mkdir -p ~/leap/example
@@ -139,21 +110,13 @@ The `leap new` command will ask you for several required values:
* domain: The primary domain name of your service provider. In this tutorial, we will be using "example.org".
* name: The name of your service provider (we use "Example").
* contact emails: A comma separated list of email addresses that should be used for important service provider contacts (for things like postmaster aliases, Tor contact emails, etc).
-* platform: The directory where you have a copy of the `leap_platform` git repository checked out.
-
-You could also have passed these configuration options on the command-line, like so:
-
- $ leap new --contacts your@email.here --domain leap.example.org --name Example --platform=~/leap/leap_platform .
-
-You may want to poke around and see what is in the files we just created. For example:
-
- $ cat provider.json
+* platform: The directory where you either have a copy of the `leap_platform` git repository already checked out, or where `leap_cli` should download it too. You could just accept the suggested path for this example.
+ The LEAP Platform is a series of puppet recipes and modules that will be used to configure your provider. You will need a local copy of the platform that will be used to setup your nodes and manage your services. To begin with, you will not need to modify the LEAP Platform.
-Optionally, commit your provider directory using the version control software you fancy. For example:
+These steps should be sufficient for this example. If you want to configure your provider further or like to examine the files, please refer to the [Configure Provider](configure-provider) section.
- $ git init
- $ git add .
- $ git commit -m "initial provider commit"
+Add Users who will have administrative access
+---------------------------------------------
Now add yourself as a privileged sysadmin who will have access to deploy to servers:
@@ -161,6 +124,7 @@ Now add yourself as a privileged sysadmin who will have access to deploy to serv
NOTE: in most cases, `leap` must be run from within a provider instance directory tree (e.g. ~/leap/example).
+
Create provider certificates
----------------------------
@@ -173,43 +137,39 @@ Create a temporary cert for your main domain (you should replace with a real com
$ leap cert csr
-To see details about the keys and certs that the prior two commands created, you can use `leap inspect` like so:
- $ leap inspect files/ca/ca.crt
+Setup the provider's node and services
+--------------------------------------
-NOTE: the files `files/ca/*.key` are extremely sensitive and must be carefully protected. The other key files are much less sensitive and can simply be regenerated if needed.
+A "node" is a server that is part of your infrastructure. Every node can have one or more services associated with it. Some nodes are "local" and used only for testing, see [Development](development) for more information.
+Create a node, with `all the services needed for Email: "couchdb", "mx", "soledad" and "webapp"`
-Edit provider.json configuration
---------------------------------------
+ $ leap node add node1 ip_address:x.x.x.w services:couchdb,mx,soledad,webapp
-There are a few required settings in provider.json. At a minimum, you must have:
+NOTE: replace x.x.x.w with the actual IP address of this node
- {
- "domain": "example.org",
- "name": "Example",
- "contacts": {
- "default": "email1@example.org"
- }
- }
+This created a node configuration file in `nodes/node1.json`, but it did not do anything else. It also added the 'tag' called 'production' to this node. Tags allow us to conveniently group nodes together. When creating nodes, you should give them the tag 'production' if the node is to be used in your production infrastructure.
-For a full list of possible settings, you can use `leap inspect` to see how provider.json is evaluated after including the inherited defaults:
+Initialize the nodes
+--------------------
- $ leap inspect provider.json
+Node initialization only needs to be done once, but there is no harm in doing it multiple times:
+ $ leap node init node1
-Setup the provider's node and services
---------------------------------------
+This will initialize the node "node1". When `leap node init` is run, you will be prompted to verify the fingerprint of the SSH host key and to provide the root password of the server. You should only need to do this once.
-A "node" is a server that is part of your infrastructure. Every node can have one or more services associated with it. Some nodes are "local" and used only for testing, see [Development](development) for more information.
-Create a node, with all the services needed for Email - "couchdb", "mx", "soledad" and "webapp":
+Deploy the LEAP platform to the nodes
+--------------------
- $ leap node add node1 ip_address:x.x.x.w services:couchdb,mx,soledad,webapp tags:production
+Now you should deploy the platform recipes to the node. [Deployment can take a while to run](http://xkcd.com/303/), especially on the first run, as it needs to update the packages on the new machine.
-NOTE: replace x.x.x.w with the actual IP address of this node
+ $ leap deploy
+
+Watch the output for any errors (in red), if everything worked fine, you should now have your first running node. If you do have errors, try doing the deploy again.
-This created a node configuration file in `nodes/node1.json`, but it did not do anything else. It also added the 'tag' called 'production' to this node. Tags allow us to conveniently group nodes together. When creating nodes, you should give them the tag 'production' if the node is to be used in your production infrastructure.
Setup DNS
---------
@@ -232,27 +192,6 @@ If you cannot edit your DNS zone file, you can still test your provider by addin
Please don't forget about these entries, they will override DNS queries if you setup your DNS later.
-Initialize the nodes
---------------------
-
-Node initialization only needs to be done once, but there is no harm in doing it multiple times:
-
- $ leap node init production
-
-This will initialize the node with the tag "production". When `leap node init` is run, you will be prompted to verify the fingerprint of the SSH host key and to provide the root password of the server. You should only need to do this once.
-
-
-Deploy the LEAP platform to the nodes
---------------------
-
-Now you should deploy the platform recipes to the nodes. [Deployment can take a while to run](http://xkcd.com/303/), especially on the first run, as it needs to update the packages on the new machine.
-
- $ leap deploy
-
-Watch the output for any errors (in red), if everything worked fine, you should now have your first running node. If you do have errors, try doing the deploy again.
-
-NOTE: the output from deploying can be quite busy, so we often do them each node one by one.
-
What is going on here?
--------------------------------------------
@@ -283,7 +222,7 @@ Access the web application
In order to connect to the web application in your browser, you need to point your domain at the IP address of your new node.
-Next, you can connect to the web application either using a web browser or via the API using the LEAP client. To use a browser, connect to https://leap.example.org (replacing that with your domain). Your browser will complain about an untrusted cert, but for now just bypass this. From there, you should be able to register a new user and login.
+Next, you can connect to the web application either using a web browser or via the API using the LEAP client. To use a browser, connect to https://example.org (replacing that with your domain). Your browser will complain about an untrusted cert, but for now just bypass this. From there, you should be able to register a new user and login.
Testing with leap_cli
---------------------