Skip to content

Commit

Permalink
clean up digital ocean to match AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
kayiwa committed Mar 5, 2022
1 parent 9bbe7ea commit df5fdc9
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions docs/cloud/digital-ocean.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
# DigitalOcean

DigitalOcean, Inc. ([digitalocean.com](http://digitalocean.com)) is a
cloud infrastructure provider that provides cloud services to developers
to help to deploy and scale applications that run simultaneously on
multiple computers.

The following is a step-by-step guide to installing DocNow using
macOS.

It is intended for anyone without prior experience.
The following is a step-by-step guide to installing DocNow in DigitalOceean. The instructions use terminology for macOS. You should be able to follow these instructions without prior experience with DigitalOcean or macOS Terminal, but if this is your first time administering an application, fair warning! This may take up to 2 hours to install.

Please follow each step carefully and open an issue on the [Github
Repository](https://github.com/DocNow/docnow-ansible/issues) if you find
something missing.

### 1. Create an SSH Key
### 1. Install Ansible

Ansible will be used to configure the Virtual Private Server you will be setting up on [AWS Lightsail](https://aws.amazon.com/lightsail/?p=gsrc&c=ho_lvm). This server will host the DocNow App.

You will need a Programmers Editors like [Microsoft's VSCode](https://code.visualstudio.com) to make edits below

Start by opening the Terminal application on your Mac in `Applications/Utilities`

Install Homebrew by copying the following into your Terminal:

``` /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ```

*This will take a few minutes*

Then copy the following into your Terminal:

```git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow```

*This will take a few minutes*

Then install Ansible by copying the following into your Terminal:

``` brew install ansible ```

Now your computer has the tools it needs to interface with DigitalOcean

### 2. Sign up for Digital Ocean

### Create an SSH Key

To host your Docnow Application on DigitalOcean you will need SSH
(Secure Shell, allows for secure access to remote servers).
Expand All @@ -38,7 +58,7 @@ ssh-keygen -f ~/.ssh/docnow_id_rsa
```

This will save your DigitalOcean keys under a hidden directory name
`/Users/<macOSusername>/.ssh` which is the default location of your ssh keys.
`/Users/[macOSusername]/.ssh` which is the default location of your ssh keys.
You can list the contents of the directory by running the following:

```bash
Expand All @@ -58,7 +78,7 @@ Enter without typing anything to save it to the default location.
```bash
Generating public/private rsa key pair.
Enter file in which to save the key
(/Users/username/.ssh/docnow_id_rsa):
(/Users/[macOSusername]/.ssh/docnow_id_rsa):
```

After hitting enter, you'll be prompted for an optional passphrase which
Expand All @@ -75,21 +95,21 @@ Enter same passphrase again:
```

⚠️Note: Nothing will appear in the terminal as you enter your
passphrase. This is intentional. You\'re still typing though.
passphrase. This is intentional. You're still typing though.

You now have a public and private key that you'll use to authenticate
with the server droplet you'll create. The screen output will look like
this:

```bash
Your identification has been saved in
/Users/username/.ssh/docnow_id_rsa.
/Users/[macOSusername]/.ssh/docnow_id_rsa.
Your public key has been saved in
/Users/username/.ssh/docnow_id_rsa.pub.
/Users/[macOSusername]/.ssh/docnow_id_rsa.pub.

The key fingerprint is:

a9:49:EX:AM:PL:E3:3e:a9:de:4e:77:11:58:b6:90:26 username@mac-mini
a9:49:EX:AM:PL:E3:3e:a9:de:4e:77:11:58:b6:90:26 [macOSusername]@mac-mini

The key's randomart image is:
+--[ RSA 2048]----+
Expand All @@ -114,18 +134,16 @@ terminal to display your public key:
cat ~/.ssh/docnow_id_rsa.pub*
```
Copy all the output to a text file, as we\'ll use it when creating a
Copy all the output to a text file, as we'll use it when creating a
DigitalOcean droplet in the next steps.

### 2. Sign up for Digital Ocean

Your machine will connect to a server and admin that you alone have
access to, and from which you control the machine's settings.
DocNow is written to run on most cloud providers including DigitalOcean
and you will need a virtual private server host (VPS).
(Advanced users may install the docnow application using DigitalOcean\'s
(Advanced users may install the docnow application using DigitalOcean's
API.)

**Create an account**
Expand Down Expand Up @@ -154,15 +172,15 @@ distribution (instead of the default 20.04):

Select the **4 GB / 2 CPUs** option for your droplet size:

**Do not click the green create button yet**, as we\'ll continue to
**Do not click the green create button yet**, as we'll continue to
additional options in the next steps.
# Droplet creation (options & SSH key)
After choosing the droplet size, and location closest to you, consider
checking the box for **Monitoring** in the additional options section:
The monitoring option will allow you to later track your droplet\'s
The monitoring option will allow you to later track your droplet's
resource usage from your DigitalOcean account.

Then, under the **Authentication** section, choose **`SSH keys`** and
Expand Down Expand Up @@ -216,28 +234,10 @@ software
### 3. Installing the Docnow software
- Install Homebrew
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
- Most versions of macOS already have git installed. If you happen to
find yours not to have it installed.
```bash
brew install git
```
- Install Ansible
```bash
brew install ansible
```
- Edit the `hosts.example` file in the cloned
docnow-ansible repository. Replace the [1.2.3.4` in the
file with your DigitalOcean Droplet IP address above. Make a copy of
the file and name it `hosts`
- You can now run:
* 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.
* Move the docnow-ansible folder to your Documents folder
* Modify the `hosts.example` to have the IP address from the steps above.
* rename the file `hosts.example` file to `hosts`
```bash
ansible-playbook -i hosts playbooks/do_install.yml
Expand Down

0 comments on commit df5fdc9

Please sign in to comment.