Deploying Parts Unlimited MRP on DCOS

Introduction

In this HOL, we will explain how you can easly deploy the Parts Unlimited MRP application on DCOS from mesosphere, using Azure Container Services (ACS) on Azure.

We are recommanding you to read and do first the HOL on Docker, to understand the concept of the containers.

Prerequisites

  • If you are using Windows, we recomand to install the Bash on Windows feature, and do all the HOL commands using it

Note : All the screenshots and command are from a Mac environment, it could have some differences in terms of commands or procedure if you are using Windows. Read the feedbacks section at the end of this Labs to have more infos on how you can ask questions.

Deploy an Azure Container Services (ACS) cluster

ACS is very simple to deploy, you can do it using Azure CLI but we will use the portal for this HOL.

  1. First, you have to create a ssh keypair on your machine, you can do that using the ssh-keygen command

  1. Click here to deploy an ACS cluster from the portal

    Note : You may have to enter your credententials to be authenticated on Azure first

  2. Click on the Create button from the Azure portal

  1. First, you have to fill the Basics section and then click on OK

Note : On the SSH public key section you have to paste your public key (.pub file), If you using a Mac or a Linux machine you can use the following command : pbcopy

  1. Pick the DC/OS Framework for the next section

  1. The final step is to define the options about your cluster

    To do this HOL the following setting are enough : 3 Agent / 1 Master / Standard D2

Choose an unique DNS prefix

  1. Review your final settings and validate your deployment

  2. After around 10 minutes, you deployment should be succeeded, click on the Last deployment section :

  1. Click on the first deployment option : ( Ex : microsoft.acs-2016092509…. )

  1. Notify and copy the output section containing your connections string, we will use it in the next section

Deploy PUMRP on your cluster

  1. The first step is to inniate the SSH Tunnel Connection on your cluster. There is multiple way to do it depends if you are on Mac/Linux or Windows, you can read the multiple ways to do it by clicking here.

Note : For example, using my previous example, here is my command : sudo ssh -fNL 80:localhost:80 -p 2200 Julien@myacsjulienstroh.eastus.cloudapp.azure.com -i ~/.ssh/myACS_rsa

  1. Navigate to the following web pages to verify if you connection works :

Note : If you have an error to open this two pages, you should fix it first before continue the next step. It may mean that your SSH tunnel connection is not working correctly

  1. Install the DCOS CLI, more info here

    • Use localhost for the url: ./dcos config set core.dcos_url http://localhost
    • dcos auth login will not work and is unnecessary since the secure ssh tunnel has been established to the master node.
  2. Download on your local machine the following marathon.json file

    Note : This file contain the PartsUnlimitedMRP deployment

  3. Edit this JSON file with your favorite editor by searching for : "HAPROXY_0_VHOST":"YOURFQDN" (lines 53 and 85) and replace YOURFQDN with the previous FQDN agents connection string that you copy in the previous section of this HOL

    Note : In our example it will be "HAPROXY_0_VHOST":"myacsjulienstrohagents.eastus.cloudapp.azure.com"

  4. Save and close your marathon.json file with the new parameters

  5. Open an other terminal, navigate to the folder where the marathon.json file is located, and enter the following command using the dcos CLI :
  dcos package install marathon-lb

You may have to confirm the deployment of the marathon-lb package in the CLI

  1. Check on the marathon dashboard (http://localhost/marathon) if the deployment appear

  1. Back to your terminal, run the following command to deploy Parts Unlimited MRP on your cluster :
  dcos marathon group add marathon.json

Double check on the Marathon portal if the deployment is working

  1. After few second the deployment should be on the Running state

  1. You should be able to browse the application using the public agent FQDN of your cluster and see the result

In my case I will browse my cluster using the current FQDN http://myacsjulienstrohagents.eastus.cloudapp.azure.com/mrp

You have to add /mrp at then end of the URL

Continuous Feedbacks

Issues / Questions about this HOL ??

If you are encountering some issues or questions during this Hands on Labs, please open an issue by clicking here

Thanks