Deploy a Solution¶
During this Hands-On training, you will start from a minimal simulator and progressively transform it into a fully deployed Solution.
You will learn to configure environments, work with CosmoTech run templates, build and publish Docker images, and connect everything to ADX and Power BI for visualization.
In this discovery part, we will go through the steps to deploy a pre-packaged Solution, using templated content and babylon.
1: Connect to the cluster¶
For this, we will need to access the kubernetes service stored on Azure.
Today we are going to use the following cluster: aks-qa-campaign
Once you're logged into the azure portal, go to kubernetes service. In here, select the cluster specified above. On the new page, you will find a connect button at the top. Upon clicking it, a pop up will appear on the right side of the window. Select the "Azure-cli" tab and run the first three commands.
Congrats, you now have a connection to the kubernetes cluster.
2: Choosing a cluster connection¶
You can see all the connections on your computer by typing
kubectl config get-contexts
And you can select the one you want to use with
kubectl config use-context <CONTEXT-NAME>
3: Setting up the workfolder¶
Create a new folder where we'll setup our Babylon
mkdir bma_folder
cd bma_folder
In here we're going to initialize our babylon
babylon init
Here, you will find a file named variables.yaml that contains most of the elements you will update during the Hands-On training.
4: Setting up the organization and workspace¶
Open the files created by a babylon in the IDE of your choice and head to variables.yaml
Our first step is going to be setting up our organization, the only usable variable in here is the name.
Then we can customize our workspace name, key and description.
5: Setting up the Solution - First Part¶
Setting up the Solution will require a bit more work now.
Just as for the Workspace, we can customize the name, key and description.
You will need to update the following values in variables.yaml:
solution_key: A unique key for your Solutionsolution_name: The name of your Solutionsolution_description: A description for your Solutionworkspace_key: A unique key for your workspace, it will be required for some resource creationworkspace_name: The name of your workspaceworkspace_description: A description of your workspacesecurity.accessControlList: Add your mail addresses asAdminto ensure that you will have access to your Solutioncluster_name: The name of the Kubernetes cloud clustercluster_domain: The full domain name of the Kubernetes cloud clustertenant: The id of the tenant used to host the platformwebapp_name: A unique name for your Web App
6: Obtaining a simulator¶
At this point, there are two possibilities:
a. Using a pre-packaged simulator
Following the instructions of the person in charge of the Hands-On training, go directly to:
7: Setting up the Solution - Second Part
b. Building a simulator of your own
Customize an existing Simulator based on the brewery sample Solution:
Customize an existing Simulator
7: Setting up the Solution - Second Part¶
Now that we have a usable simulator image, we are able to finish preparing our Solution.
The simulator repository will be our image name and our simulator version will be the simulator version.
8: Setting up the WebApp¶
Setting up the WebApp will be easier than setting up the Solution
The variables we'll be touching are:
- The cluster name
- The cluster domain
- The tenant (with the tenant- truncated)
- The webapp name
We'll be using those variables:
cluster_name: aks-qa-campaign
cluster_domain: aks-qa-campaign.azure.platform.cosmotech.com
tenant: e2e
You can use your favorite words for the webapp name
9: Setting up the security¶
For this we'll just need to input our email adress as Id and give ourself the admin role:
security:
default: none
accessControlList:
- id: <YOUR_MAIL>
role: admin
At the time of writing this guide, the keycloak group system has been implemented in the Cosmotech API but is still undergoing compatibility work with the WebApp.
10: Running Babylon¶
Before giving Babylon all the informations we entered and putting it to work. We're going to need to tell it where it should work.
For this, run this command:
babylon namespace use -c <CONTEXT_NAME> -t <TENANT_NAME> -s <STATE_NAME>
And now that Babylon has everything it needs to now, let's run it.
babylon apply project/
11: Update info¶
Now that we have created our desired Cosmotech objects and deployed our personnal webapp, before looking at the detail, we can see how to easily modify the configuration of our objects.
If we modify any informations in our organization, workspace or Solution, and run again the same command:
babylon apply project/
Babylon will automatically compare our local configuration to the existing objects and make the necessary changes by itself.
12: Accessing the webapp¶
In the logs of our previous command, babylon provides us with the link to our deployed webapp. It should look something like this:
https://aks-qa-campaign.azure.platform.cosmotech.com/tenant-e2e/webapp-<WEBAPP_NAME>
13: Creating a dataset¶
Create a dataset on the Web App:
Creating a dataset
14: Creating a Scenario and running it¶
Create a scenario and run it on the Web App:
Creating and running a scenario
15: Visualizing results¶
Visualize results on the Web App:
A brief look at Superset
16: Cleaning up after yourself¶
Once we are done with working on this workshop, we can clean up for the next person and those working on this tenant by running a simple command.
babylon destroy
This simple command will delete everything created by Babylon in our context. And with that this session is wrapped up.
This concludes the first section on deploying a pre-packaged Solution. You can explore and experiment with it if you wish.
In the next part, we will go inside of the Solution and start customizing it.