Skip to content

Commit ff12942

Browse files
committed
tidy up letsencrypt tutorial and add intro logo
1 parent f4a43b7 commit ff12942

File tree

2 files changed

+62
-17
lines changed

2 files changed

+62
-17
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ You should expect to see: <br />
157157

158158
### Intermediate: Detailed Step-by-Step Instructions for _Your_ App
159159

160-
> To be added soon!
160+
> Coming soon!
161161
162162
### Intermediate: Environment Variables on Heroku
163163

@@ -168,7 +168,8 @@ see: [github.com/dwyl/learn-environment-variables#**environment-variables-on-her
168168

169169
A Version of your App for Each Pull Request!
170170

171-
> Help wanted!
171+
> First ensure that you _understand_ what Continuous Integration is...
172+
see: https://github.com/dwyl/learn-travis
172173

173174
### Advanced: Docker Containers
174175

SSL-certificate-step-by-step-setup-instructions.md

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Step-by-Step Setup Instructions for Let's Encrypt
1+
![letsencrypt-760x320](https://cloud.githubusercontent.com/assets/194400/23311312/8c4cc85a-faad-11e6-912c-9cc96ec21da6.png)
22

3-
> Note: These instructions are only applicable to web apps
4-
with a custom domain name.
3+
# Step-by-Step Setup Instructions for Let's Encrypt _Free_ SSL
4+
5+
> _Note: These instructions are only applicable to web apps
6+
with a **custom domain** name_.
57

68

79
## Why?
@@ -12,12 +14,33 @@ to Secure/Encrypt all communications between users and your app.
1214

1315
## What?
1416

15-
Let's Encrypt offers a ***Free*** Automated SLL Certificate Service
16-
17+
Let's Encrypt offers a ***Free*** Automated SSL Certificate Service brought to you by the non-profit Internet Security Research Group (ISRG). <br />
1718
see: https://letsencrypt.org/about/
1819

20+
### Works for apps written in _Any_ Language/Framework!
21+
22+
The instructions in this tutorial/guide are applicable
23+
to an app written in ***any language or framework***.
24+
You will _temporarily_ deploy a Node.js `http-server` to your Heroku app
25+
which will allow Let's Encrypt to _verify_ that you "_own_" the app/domain.
26+
27+
> _**Note**: No Node.js knowledge is assumed or required. You won't be
28+
writing a single line of JS code._
29+
30+
Once you have set up SSL you can deploy what ever kind of app you like.
31+
(_in our case the app is written in [Elixir/Phoenix!](https://github.com/dwyl/technology-stack/#the-pete-stack)
32+
node.js is just an easy way to get this working in a **generic** way._)
33+
1934
## How?
2035

36+
### Step 0: Clone this Repository to get the Setup Code
37+
38+
```
39+
git clone https://github.com/dwyl/learn-heroku.git
40+
cd learn-heroku
41+
42+
````
43+
2144
### Step 1: Install `certbot`
2245
2346
> `certbot` installation instructions for various platforms:
@@ -38,20 +61,26 @@ Once you've installed `certbot` run the following command:
3861
sudo certbot certonly --manual
3962
```
4063

41-
Top-tip you will want to use both the domain an `www` subdomain:
64+
Remember to use both the domain a `www` subdomain. (_separated by a space_) e.g:
4265

66+
```
67+
example.com www.example.com
68+
```
69+
70+
Our app was:
4371
```
4472
healthlocker.uk www.healthlocker.uk
4573
```
4674

4775
Follow the steps and **pay _close_ attention**!
4876

49-
Enter the
50-
5177
When you reach the screen that looks like this:
78+
5279
![certbot-instructions](https://cloud.githubusercontent.com/assets/194400/23255249/c7d2b250-f9b2-11e6-9d45-d2cdb965defa.png)
5380

54-
Instructions: (_for reference ONLY see below for modified instructions_)
81+
_**DON'T** `continue` until you have completed
82+
83+
Instructions: (_for reference ONLY see below for sub-set of instructions_)
5584
```
5685
mkdir -p /tmp/certbot/public_html/.well-known/acme-challenge
5786
cd /tmp/certbot/public_html
@@ -64,7 +93,7 @@ s = BaseHTTPServer.HTTPServer(('', 80), SimpleHTTPServer.SimpleHTTPRequestHandle
6493
s.serve_forever()"
6594
```
6695

67-
You _wont_ be _able_ to run shell commands on the Heroku instance
96+
You _wont_ be _able_ to run shell commands on a Heroku instance
6897
so we need to use a _temporary_ node.js server to achieve our objective.
6998

7099
In your `current working directory` (_on your localhost_)
@@ -82,6 +111,7 @@ printf "%s" WgFpodyij_PDzkU0MZ3CzKCI05hjLOcq2tP-1rs6ko0.kURQ5HbILtRXEwJA2QI4W5Td
82111
```
83112
The tokens will be _specific_ to you so make sure you get the correct tokens.
84113

114+
85115
### Step 3: Set Git Remote
86116

87117
Check what your _current_ `origin` remote is:
@@ -114,12 +144,16 @@ It should look something like this:
114144
remember to (_temporarily_) _dissable_ the checkbox `Wait for CI to
115145
pass before deploy` (_we have no tests for this temporary server!_).
116146

117-
make a commit on your local branch so you can push to github (_and trigger the heroku build_)
147+
### Step 4.1: Commit Your Changes (_the token file_) and Push to GitHub
118148

149+
Make a commit on your local branch so you can push to github (_and trigger the heroku build_)
119150

120151
### Step 5: Visit the Endpoint in your Browser to confirm it worked:
121152

122-
our is: http://healthlocker.uk/.well-known/acme-challenge/
153+
Visit your app in a browser to confirm the deploy worked.
154+
e.g: http://example.com/.well-known/acme-challenge/
155+
156+
The url for _our_ app was: http://healthlocker.uk/.well-known/acme-challenge/
123157

124158
![click-on-filename-to-test](https://cloud.githubusercontent.com/assets/194400/23293421/eda79e68-fa5d-11e6-95d4-a8c57fe4a8fd.png)
125159

@@ -222,9 +256,15 @@ Restore the `default` branch for deployment on Heroku:
222256
<br /> <br /><br /> <br />
223257

224258

225-
## Trouble-Shooting
259+
# Trouble-Shooting (_if it doesn't work!_)
260+
261+
The _first_ time I tried to run the `certbot` command, _nothing_ worked!
262+
E.g: the Build failed on Heroku, the cert process failed (_see below_).
263+
This is a catalog of the Trouble-Shooting we did.
226264

227-
The _first_ time I tried this the build ***failed***:
265+
> _As always, if you get stuck,
266+
[**ask a question**](https://github.com/dwyl/learn-heroku/issues)
267+
we will try our best to help!_
228268

229269
![heroku-activity-log-fail](https://cloud.githubusercontent.com/assets/194400/23256822/026ec3a8-f9b9-11e6-9c4b-c26af4276426.png)
230270

@@ -272,7 +312,11 @@ I deleted all the files created in the process and started from scratch ...
272312
Failed again: <br />
273313
![fail again](https://cloud.githubusercontent.com/assets/194400/23263831/4c5070d4-f9d7-11e6-8559-57b2aa714b26.png)
274314

275-
Just keep trying ...
315+
Re-trace your steps and make sure you followed the instructions _exactly_.
316+
Also, timing matters. if you take a break between steps
317+
you will get a "Time Out Error"...
318+
We initially got it wrong,
319+
but after re-running the command it works as expected.
276320

277321

278322
#### If you get a _Certificate Warning_ in Step 7.8

0 commit comments

Comments
 (0)