Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ 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. User Stories for DevOps

  3. Choices for DevOps Technologies
  4. Java DevOps Workflow
  5. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  6. AWS server deployment options

  7. Digital Ocean
  8. Cloud regions
  9. AWS Virtual Private Cloud
  10. Azure Cloud Powershell

  11. Git and GitHub vs File Archival
  12. Git Commands and Statuses
  13. Data Security GitHub
  14. Git Commit, Tag, Push
  15. Git Utilities
  16. GitHub API

  17. TFS vs. GitHub

  18. Jenkins Server Setup
  19. Jenkins Plug-ins
  20. Jenkins Freestyle jobs
  21. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  22. Dockerize apps
  23. Docker Setup
  24. Docker Build

  25. Maven on MacOSX

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

  29. Ansible

  30. MySQL Setup

  31. SonarQube static code scan

  32. API Management Microsoft
  33. API Management Amazon

  34. Scenarios for load