Giter Site home page Giter Site logo

cloudneeti / blueprints Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kirpasingh/blueprints

1.0 3.0 0.0 37.22 MB

A library of composable ARM templates (with supporting documentation) that embody the best practices identified by p&p.

Shell 34.62% Batchfile 23.02% PowerShell 8.86% C# 32.30% CSS 0.43% ASP 0.02% Python 0.75%

blueprints's Introduction

Blue Prints Readme

The following readme goes over the requirements to run and test the blue print deployments. The scripts support Linux or a Windows deployment.

Prerequisites:

Running the Blue Print scripts

Copy the files to a location on your targeted

Windows

  • Open a command windows
  • Navigate to file location
  • Run the selected scipts

Linux

Linux deployments are using SSH public/private keys to log on to the linux deployment. To generate your public private key pair, run the following command and provide it with the name for your key.

ssh-keygen -t rsa -b 2048

The key will be generated at the location "/home/username/.ssh/yoursshfile.pub".
Provide this full path when the script ask for your public key. For example:

./azurecli-single-vm-sample.sh your-subscription-id

Enter username: name you'll use to logon to the box

Enter public Key file: /home/username/.ssh/your-ssh-file.pub

To login into your Linux box with your SSH key.

ssh user@yourmachine -i fullpathforprivatekeyfile

Running test to validate the Blue Print deployments

Under the test folder are some tools to help validate your deployment or search through the log file for a mistakes.

ValidateRG tool validates your blueprint deployment based on known deployment in a JSON file.

Here's how you run the tool:

ValidateRG.cmd your-subscription-id name-of-your-targeted-RG select-desiredstate.JSON

For example

ValidateRG.cmd your-subscription-id my-singlevm-RG singlevm-desiredstate.json

Creating a desiredstate.json

The desiredstate.json file is created from the following steps.

  1. Locate a resource group you want to use as your baseline to test against.
  2. Create a JSON of this deployment by running the following command: "azure group show --name --subscription --json > somename-desiredstate.json
  3. Edit generated JSON file
    1. Keep JSON entry for "name" and "resources" array. Remove all entries, they aren't used
    2. Change "name" value to somename-desiredstate
  4. Save this file. It's now your JSON baseline of your desired state.

Running Unit Test against ValidateRG.py

To test the ValidateRG.py code. 12 JSON files were created under .\unittestjson\ directory.

Run "unit-test-ValudateRG.cmd" to the desired state against test json files to validate failures are found.

They will test that the ValidateRG.py code can test for the following 4 issues:

  1. Not enough assets were found in the deployment
  2. Extra assets were found in the deployment
  3. An asset is missing from the deployment
  4. Azure asset found that isn't specified in the baseline

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

blueprints's People

Contributors

atoakley avatar bennage avatar francischeung avatar hanzpeng avatar hanzzhang avatar johnpwsharp avatar kirpasingh avatar rohitsharma-pnp avatar telmosampaio avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.