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. Git and GitHub vs File Archival
  4. Git Commands and Statuses
  5. Git Commit, Tag, Push
  6. Git Utilities
  7. Data Security GitHub
  8. GitHub API
  9. TFS vs. GitHub

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

  14. Digital Ocean
  15. Cloud regions
  16. AWS Virtual Private Cloud

  17. Azure Cloud Onramp
  18. Azure Cloud
  19. Azure Cloud Powershell

  20. Powershell Ecosystem
  21. Powershell on MacOS
  22. Powershell Desired System Configuration

  23. Jenkins Server Setup
  24. Jenkins Plug-ins
  25. Jenkins Freestyle jobs
  26. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  27. Dockerize apps
  28. Docker Setup
  29. Docker Build

  30. Maven on MacOSX

  31. Ansible

  32. MySQL Setup

  33. SonarQube static code scan

  34. API Management Microsoft
  35. API Management Amazon

  36. Scenarios for load