{"id":107,"date":"2018-03-09T20:33:25","date_gmt":"2018-03-09T20:33:25","guid":{"rendered":"http:\/\/tonysbit.blog\/?p=107"},"modified":"2018-03-09T20:33:25","modified_gmt":"2018-03-09T20:33:25","slug":"deploying-a-ssl-protected-containerized-app-part-2","status":"publish","type":"post","link":"https:\/\/tonysbit.blog\/?p=107","title":{"rendered":"Deploying a SSL Protected Containerized App: Part 2"},"content":{"rendered":"
Let’s quickly do a checklist of what we have so far<\/p>\n
If you have not done these things, you can deploy your virtual machine following the steps in part 1<\/a>.<\/p>\n Start this part by initializing a SSH session into the virtual machine.<\/p>\n Swap to the root user by running On the virtual machine that you have deployed run the following commands:<\/p>\n \u200b\u200b\u200b\u200b\u200b\u200b Note: These are the quick commands to install docker, for more information as to what they do exactly visit the docs<\/a>.<\/p>\n Certbot is a nifty client that will fetch SSL\/TLS certificates and is used as the client for Let’s Encrypt.<\/strong><\/p>\n Download Cert Bot<\/p>\n Pre-requisites:<\/p>\n Run installation:<\/p>\n Note: These are the quick commands to install certbot, for more information as to what they do exactly visit the docs<\/a>.<\/p>\n On the virtual machine that you have deployed run the following commands:<\/p>\n When running certbot to obtain a SSL certificate, too many attempts will result in a lockout of the domain of up to a hour. To prevent a lockout we will be testing the creation of the certificate with a –staging command.<\/p>\n Run through the prompts and at the very end enter your domain address (domain.com.au).<\/p>\n The successful output is shown below<\/p>\n <\/p>\nPreparing the Host<\/h1>\n
<\/code><\/p>\n
su root<\/code><\/p>\n
Installing Docker<\/h2>\n
Install docker<\/a><\/h3>\n
sudo yum install -y yum-utils\u00a0 device-mapper-persistent-data\u00a0 lvm2<\/code><\/p>\n
sudo yum-config-manager\u00a0 \u00a0 --add-repo https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/code><\/p>\n
sudo yum install docker-ce<\/code><\/p>\n
Downloading CertBot<\/h2>\n
yum -y install yum-utils<\/code>
\nyum install epel-release<\/code><\/p>\n
sudo yum install certbot<\/code>
\n<\/span><\/b><\/p>\nGenerating a SSL Certificate<\/h2>\n
sudo certbot certonly --staging<\/code><\/p>\n