Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Instagram Youtube

Github Stackoverflow Pinterest

https://wilsonmar.github.io/digital-ocean

Platform as a Service (PaaS)


Overview

This article describes how to bring up servers within Digital Ocean a cloud-based virtual private server (VPS) to host a server (Jenkins).

I want you to feel confident that you’ve mastered this skill. That’s why this takes a hands-on approach where you type in commands and we explain the responses and possible troubleshooting. This is a “deep dive” because all details are presented.

Like a good music DJ, I’ve carefully arranged the presentation of concepts into a sequence for easy learning, so you don’t have to spend as much time as me making sense of the flood of material around this subject.

Sentences that begin with PROTIP are a high point of this website to point out wisdom and advice from experience. NOTE point out observations that many miss. Search for them if you only want “TL;DR” (Too Long Didn’t Read) highlights.

Stuck? Contact me and I or one of my friends will help you.

Account Sign-up

  1. Sign up for an account at
    DigitalOcean.com

  2. Provide a credit card or Paypal account enough for a $5 droplet.

    Define SSH Keys

  3. Open a Terminal shell window to a folder where you generate SSH key pair:

    cd ~/.ssh

    See https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets

    ssh-keygen -t rsa

  4. Save the file as “do_s” or another file of your choosing. Unlike other programs, we won’t be using the default file names on your machine.

  5. Copy the public key file into your clipboard:

    pbcopy < ~/.ssh/do_s.pub

    Alternately, use a text editor to open the file to copy, such as:

    atom ~/.ssh/id_rsa.pub

  6. Switch back to the Create Droplet webpage to click “New SSH Key”.

  7. Click in the box and press command+V to paste.

    Server

  8. Specify a server name.

    PROTIP: Define (in writing) a server naming convention for use by your team. Use of sequential numbers would require a tracking system.

  9. Select the location, etc.

  10. Select Droplet image.

    QUESTION: Select my own.

  11. Copy the hostname to your clipboard and paste to your notes.

    ubuntu-512mb-nyc1-01

  12. Click the green Create button.

  13. Copy the IP Address to your clipboard and paste to your notes. For example:

    192.241.155.147

  14. Click More to Access Console.

    NOTE: Each Droplet spun up is a new VPS for your personal use.

    Alternately,

    ssh root@192.241.155.147

    The first time you connect, you’ll see a message such as:

    The authenticity of host '192.241.155.147 (192.241.155.147)' can't be established.
    ECDSA key fingerprint is SHA256:sdfsdfsdfu5+Xsaf4COHb0UaRTxeoycUh4tLj1kwNQ.
    Are you sure you want to continue connecting (yes/no)?
    

    Type yes because this is expected behavior.

  15. Enter your password.

  16. Click API at the top menu.

    Register the app.

  17. Add image

    See https://cloud.digitalocean.com/images/snapshots

Aditionally:

  • https://www.docker.com/products/docker-toolbox
  • https://www.digitalocean.com/support
  • https://www.digitalocean.com/community

Auto Deploy to Digital Ocean

  • We should then be able to trigger a manual deployment into production by supplying a valid RC release from the list of RC tagged releases.

More on DevOps

This is one of a series on DevOps:

  1. DevOps_2.0
  2. ci-cd (Continuous Integration and Continuous Delivery)
  3. User Stories for DevOps

  4. Git and GitHub vs File Archival
  5. Git Commands and Statuses
  6. Git Commit, Tag, Push
  7. Git Utilities
  8. Data Security GitHub
  9. GitHub API
  10. TFS vs. GitHub

  11. Choices for DevOps Technologies
  12. Java DevOps Workflow
  13. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  14. AWS server deployment options

  15. Cloud services comparisons (across vendors)
  16. Cloud regions (across vendors)
  17. AWS Virtual Private Cloud

  18. Azure Cloud Onramp
  19. Azure Cloud
  20. Azure Cloud Powershell
  21. Bash Windows using Microsoft’s WSL (Windows Subystem for Linux)

  22. Digital Ocean
  23. Cloud Foundry

  24. Packer automation to build Vagrant images
  25. Terraform multi-cloud provisioning automation
  26. Hashicorp Vault and Consul to generate and hold secrets

  27. Powershell Ecosystem
  28. Powershell on MacOS
  29. Powershell Desired System Configuration

  30. Jenkins Server Setup
  31. Jenkins Plug-ins
  32. Jenkins Freestyle jobs
  33. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  34. Docker (Glossary, Ecosystem, Certification)
  35. Docker Setup
  36. Dockerize apps

  37. Maven on MacOSX

  38. Ansible

  39. MySQL Setup

  40. SonarQube static code scan

  41. API Management Microsoft
  42. API Management Amazon

  43. Scenarios for load