Skip to content

Commit 883923f

Browse files
committed
add linode vps documentation
1 parent df5fdc9 commit 883923f

File tree

3 files changed

+186
-0
lines changed

3 files changed

+186
-0
lines changed

docs/cloud/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The Docnow App has been successfully tested to run on the following Cloud Servic
1717

1818
* [AWS](https://docnow.readthedocs.io/en/latest/cloud/aws/)
1919
* [Digital Ocean](https://docnow.readthedocs.io/en/latest/cloud/digital-ocean/)
20+
* [Linode](https://docnow.readthedocs.io/en/latest/cloud/linode)
2021
* [Scaleway](https://docnow.readthedocs.io/en/latest/cloud/scaleway/)
2122

2223
Looking to use a CSP not listed here? We'd love to work with you to add documentation. Feel free to edit this repository, or reach out to [email protected]

docs/cloud/linode.md

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
## Linode Service Provider
2+
3+
The following is a step-by-step guide to installing DocNow in Linode. The instructions use terminology for macOS. You should be able to follow these instructions without prior experience with Linode or macOS Terminal, but if this is your first time administering an application, fair warning! This may take up to 2 hours to install.
4+
5+
Please follow each step carefully and open an issue on the [Github
6+
Repository](https://github.com/DocNow/docnow-ansible/issues) if you find
7+
something missing.
8+
9+
10+
***Installing DocNow in Linode will cost money, both for running a server and collecting and storing data. Please remember to turn off your Virtual Private Server (VPS) when you are done to avoid extra charges.***
11+
12+
### 1. Install Ansible
13+
14+
Ansible will be used to configure the Virtual Private Server you will be setting up on [Linode](https://login.linode.com/signup?promo=DOCS32SAFC). This server will host the DocNow App.
15+
16+
You will need a Programmers Editors like [Microsoft's VSCode](https://code.visualstudio.com) to make edits below
17+
18+
Start by opening the Terminal application on your Mac in `Applications/Utilities`
19+
20+
Install Homebrew by copying the following into your Terminal:
21+
22+
``` /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ```
23+
24+
*This will take a few minutes*
25+
26+
Then copy the following into your Terminal:
27+
28+
```git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow```
29+
30+
*This will take a few minutes*
31+
32+
Then install Ansible by copying the following into your Terminal:
33+
34+
``` brew install ansible ```
35+
36+
Now your computer has the tools it needs to interface with Linode.
37+
38+
### 2. Set up your Linode account
39+
40+
* Follow the Linode instructions to [create a Linode account here](https://www.linode.com/docs/guides/getting-started/)
41+
42+
### Create an SSH Key
43+
44+
To host your Docnow Application on Linode you will need SSH
45+
(Secure Shell, allows for secure access to remote servers).
46+
47+
SSH uses public and private keys.
48+
49+
* Your public SSH key is what you'll provide Linode in order to authorize access to your server.
50+
* Your private SSH key remains on your computer and is required to log into your Linode server.
51+
52+
**Creating an SSH keypair**
53+
54+
Open your computer's Terminal:
55+
56+
- On macOS, this can be found by typing `terminal`' in Spotlight, or under `Applications \> Utilities \> Terminal`.
57+
58+
If you have never created an SSH keypair before, Type the following
59+
command and hit Enter:
60+
61+
```bash
62+
ssh-keygen -f ~/.ssh/docnow_id_rsa
63+
```
64+
65+
This will save your Linode keys under a hidden directory name
66+
`/Users/[macOSusername]/.ssh` which is the default location of your ssh keys.
67+
You can list the contents of the directory by running the following:
68+
69+
```bash
70+
ls -alt ~/.ssh/
71+
```
72+
73+
If this your first time you will see the `docnow_id_rsa`
74+
private key and it's public pair of `docnow_id_rsa.pub]`
75+
76+
If you already have keys you will also see `id_rsa` private
77+
key and `id_rsa.pub` public pair.
78+
79+
You'll then be prompted to enter the file where you want to save the
80+
key. If you've never created an SSH key before on this computer, hit
81+
Enter without typing anything to save it to the default location.
82+
83+
```bash
84+
Generating public/private rsa key pair.
85+
Enter file in which to save the key
86+
(/Users/[macOSusername]/.ssh/docnow_id_rsa):
87+
```
88+
89+
After hitting enter, you'll be prompted for an optional passphrase which
90+
encrypts the private SSH key. (This is an added security to protect your
91+
keys, should you ever lose your computer.)
92+
93+
We strongly recommend setting a passphrase. Keep in mind forgetting this
94+
passphrase will at least temporarily lock you out of your Linode
95+
server.
96+
97+
```bash
98+
Enter passphrase (empty for no passphrase):
99+
Enter same passphrase again:
100+
```
101+
102+
⚠️Note: Nothing will appear in the terminal as you enter your
103+
passphrase. This is intentional. You're still typing though.
104+
105+
You now have a public and private key that you'll use to authenticate
106+
with the server you'll create. The screen output will look like
107+
this:
108+
109+
```bash
110+
Your identification has been saved in
111+
/Users/[macOSusername]/.ssh/docnow_id_rsa.
112+
Your public key has been saved in
113+
/Users/[macOSusername]/.ssh/docnow_id_rsa.pub.
114+
115+
The key fingerprint is:
116+
117+
a9:49:EX:AM:PL:E3:3e:a9:de:4e:77:11:58:b6:90:26 [macOSusername]@mac-mini
118+
119+
The key's randomart image is:
120+
+--[ RSA 2048]----+
121+
\| ..o \|
122+
\| E o= . \|
123+
\| o. o \|
124+
\| .. \|
125+
\| ..S \|
126+
\| o o. \|
127+
\| =o.+. \|
128+
\| . =++.. \|
129+
\| o=++. \|
130+
+-----------------+
131+
```
132+
133+
**Obtaining your public SSH key**
134+
135+
After generating an SSH keypair, run the following command in your
136+
terminal to display your public key:
137+
138+
139+
140+
141+
### 3. Create your Virtual Private Server
142+
143+
* Create your Linode [Virtual Private Server](https://cloud.linode.com/linodes)
144+
* Choose a Distribution: Select Ubuntu 18.04 LTS
145+
* Region: (any region is OK)
146+
* Linode Plan: Select "Shared CPU/ Linode 4GB"
147+
* SSH Keys: Select: "Add an SSH Key" Label: Docnow SSH Public Key: "contents of ```cat ~/.ssh docnow_id_rsa.pub``` Add Key
148+
* Create the Linode and take note of the resulting IP address (for this example we will use 1.2.2.4) of your Virtual Private Server
149+
* Open your Terminal Application
150+
* Connect to your Virtual Private Server with the following command using the key you created above
151+
152+
```ssh -i ~/.ssh/docnow_id_rsa root@[yourIPaddresshere]```
153+
154+
If you have permissions issues, run the following in Terminal:
155+
156+
```chmod 0400 ~/.ssh/docnow_id_rsa```
157+
158+
```exit```
159+
160+
You will see:
161+
162+
```
163+
The authenticity of host '[yourIPaddress] [yourIPaddress]' cannot be established.
164+
ED25519 key fingerprint is SHA256:MtFD6zgLJkyr6Ju8nmzwNqwvqy+rayVVnp1NW97DW0s.
165+
This key is not known by any other names
166+
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
167+
Warning: Permanently added '[yourIPaddress]' (ED25519) to the list of known hosts.
168+
Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-1021-Linode x86_64)
169+
```
170+
171+
### 4. Launch your application
172+
173+
* Download and unzip the [docnow-ansible](https://github.com/docnow/docnow-ansible) zip file or, if you are a GitHub user, clone the repository to a location on your computer.
174+
* Move the docnow-ansible folder to your Documents folder
175+
* Modify the `hosts.example` to have the IP address from the steps above.
176+
* rename the file `hosts.example` file to `hosts`
177+
178+
Run the following commands in Terminal:
179+
180+
``` cd /Users/[macOSusername]/Documents/docnow-ansible-main```
181+
182+
```ansible-playbook -i hosts playbooks/linode_ubuntu_deploy.yml```
183+
184+
When it completes if you point your browser to the IP in the example thus far http://1.2.2.4 you will see the configuration page for your docnow application

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ nav:
2727
- Overview: cloud/index.md
2828
- AWS: cloud/aws.md
2929
- Digital Ocean: cloud/digital-ocean.md
30+
- Linode: cloud/linode.md
3031
- Scaleway: cloud/scaleway.md
3132
- Troubleshooting: troubleshooting.md
3233
- API: api.md

0 commit comments

Comments
 (0)