GithubHelp home page GithubHelp logo

pdxcharts's Introduction

Splunk, New Relic, Trend Micro Deep Security on a Kubernetes cluster on Azure

This repo contains helm charts, scripts and notes on how to provide a configurable environment to deploy applications to a Kubernetes cluster on Azure. This cluster uses New Relic infrastructure and Splunk for monitoring and logging. Additionally, for security Trend Micro Deep Security is installed in the VMs of the cluster.

Requirements

Set up

Deploying Kubernetes on ACS

First of all, we need to set some environment variables to make this process a little bit easier. Feel free to edit them and paste them into your terminal.

RESOURCE_GROUP=coolrgname111
LOCATION=southcentralus
CLUSTER_NAME=k8s-clus2s3r2
CLUSTER_DNS=k8s-brusmx1213
ACR_NAME=coolacr12

Now, login to Azure in your CLI:

az login

After that, deploy a new resource group (it might take a couple of minutes):

az group create -n $RESOURCE_GROUP -l $LOCATION

It should return "provisioningState": "Succeeded".

Then, deploy the Azure Container Service (full documentation). This next command asumes you dont have ssh keys in your terminal, but you can remove the --generate-ssh-keys if you would like az to use your usual pair of ssh keys (uploads ~/.ssh/id_rsa.pub to the VMs):

az acs create --orchestrator-type=kubernetes -n $CLUSTER_NAME -g $RESOURCE_GROUP -d $CLUSTER_DNS --generate-ssh-keys

It should take about 10 minutes to finish and it will return a "provisioningState": "Succeeded".

The next step is to install kubectl by running:

az acs kubernetes install-cli

Obtain the .kube/config:

az acs kubernetes get-credentials -g=$RESOURCE_GROUP -n=$CLUSTER_NAME

And finally, verify you can connect to your cluster by getting your pods:

kubect get pods

Deploying ACR

In addition to the Azure Cli 2.0 and depending on your version you might have to install the acr component in your Az CLI.

az component update --add  acr

This component allow us to manage the Azure Container Registry through our CLI. We will use a ACR to host our Docker images that will be deployed later in our cluster. Deploy one on your subscription with the following command (full documentation):

az acr create -n $ACR_NAME -g $RESOURCE_GROUP -l $LOCATION

Allow admin access to your ACR to retrieve the username and password:

az acr update -n $ACR_NAME --admin-enabled true

And get the credentials:

ACR_CREDS=`az acr credential show -n $ACR_NAME` | echo $ACR_CREDS

If you have jq installed you can do the following:

ACR_USER=`echo $ACR_CREDS | jq -r '.username'`
ACR_PASS=`echo $ACR_CREDS | jq -r '.password'`

With these credentials we will be able to push the images to the registry.

These are the following steps to run:

  1. Install TMDS through Custom Script Extension.
  2. Deploy New Relic infra in the agents.
  3. Deploy Splunk.
  4. Deploy Application.
  5. Test monitoring, logging and security.

pdxcharts's People

Contributors

brusmx avatar dtzar avatar jmspring avatar jpoon avatar timfpark avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.