Mpdreamz / ARM-Templates

Azure-Resource-Manager Templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elasticsearch Azure Marketplace offering

This repository consists of:

  • src/mainTemplate.json - Entry Azure Resource Management (ARM) template.
  • src/createUiDefinition - UI definition file for our market place offering. This file produces an output JSON that the ARM template can accept as input parameters JSON.

Building

After pulling call npm install once, this will pull in all devDependencies.

You may edit src/allowedValues.json the build will use these to patch the arm template and ui definition.

Run npm run build, this will validate EditorConfig settings, validate JSON files, patch the allowedValues and then create a zip in the dist folder.

Marketplace

The market place Elasticsearch offering offers a simplified UI over the full power of the ARM template. It will always install a cluster complete with the elasticsearch plugins Shield, Watcher & Marvel.

Example UI Flow

TODO gif that shows how to find us on the real azure market place.

You can view the UI in developer mode by clicking here. If you feel something is cached improperly use this client unoptimized link instead

ARM template

The output from the market place UI is fed directly to the ARM template. You can use the ARM template on its own without going through the market place.

Parameters

ParameterTypeDescription
esVersionenum A valid supported Elasticsearch version see this list for supported versions
esClusterNamestring The name of the Elasticsearch cluster
loadBalancerTypestring Whether the loadbalancer should be internal or external If you run external you should also install the shield plugin and look into setting up SSL on your endpoint
esPluginsstring Either Yes or No whether to install the elasticsearch suite of plugins (Shield, Watcher, Marvel)
kibanastring Either Yes or No provision an extra machine with a public IP that has Kibana installed on it. If you have opted to also install the Elasticsearch plugins using esPlugins then the Marvel and Sense Kibana apps get installed as well.
jumpboxstring Either Yes or No Optionally add a virtual machine to the deployment which you can use to connect and manage virtual machines on the internal network.
vmSizeDataNodesstring Azure VM size of the data nodes see this list for supported sizes
vmDataNodeCountint The number of data nodes you wish to deploy. Should be greater than 0.
dataNodesAreMasterEligiblestring Either Yes or No Make all data nodes master eligible, this can be useful for small Elasticsearch clusters. When Yes no dedicated master nodes will be provisioned
vmSizeMasterNodesstring Azure VM size of the master nodes see this list for supported sizes. By default the template deploys 3 dedicated master nodes, unless dataNodesAreMasterEligible is set to Yes
vmClientNodeCountint The number of client nodes to provision. Defaults 0 and can be any positive integer. By default the data nodes are directly exposed on the loadbalancer. If you provision client nodes, only these will be added to the loadbalancer.
vmSizeClientNodesstring Azure VM size of the client nodes see this list for supported sizes.
adminUsernamestring Admin username used when provisioning virtual machines
passwordobject Password is a complex object parameter, we support both authenticating through username/pass or ssh keys. See the parameters example folder for an example of what to pass for either option.
shieldAdminPasswordsecurestring Shield password for the es_admin user with admin role, must be > 6 characters
shieldReadPasswordsecurestring Shield password for the es_read user with user (read-only) role, must be > 6 characters
shieldKibanaPasswordsecurestring Shield password for the es_kibana user with kibana4 role, must be > 6 characters
locationstring The location where to provision all the items in this template. Defaults to the special ResourceGroup value which means it will inherit the location from the resource group see this list for supported locations.

Command line deploy

first make sure you are logged into azure

$ azure login

Then make sure you are in arm mode

$ azure config mode arm

Then create a resource group <name> in a <location> (e.g westeurope) where we can deploy too

$ azure group create <name> <location>

Next we can either use our published template directly using --template-uri

$ azure group deployment create --template-uri https://raw.githubusercontent.com/Mpdreamz/ARM-Templates/master/src/mainTemplate.json --parameters-file parameters/password.parameters.json -g

or if your are executing commands from a clone of this repo using --template-file

$ azure group deployment create --template-file src/mainTemplate.json --parameters-file parameters/password.parameters.json -g

<name> in these last two examples refers to the resource group you just created.

NOTE

The --parameters-file can specify a different location for the items that get provisioned inside of the resource group. Make sure these are the same prior to deploying if you need them to be. Omitting location from the parameters file is another way to make sure the resources get deployed in the same location as the resource group.

Web based deploy

Deploy to Azure

The above button will take you to the autogenerated web based UI based on the parameters from the ARM template.

It should be pretty self explanatory except for password which only accepts a json object. Luckily the web UI lets you paste json in the text box. Here's an example:

{"sshPublicKey":null,"authenticationType":"password", "password":"Elastic12"}

About

Azure-Resource-Manager Templates


Languages

Language:Shell 89.5%Language:JavaScript 10.5%