Skip to main content


Showing posts from 2016

Create #VirtualPrivateCloud, NAT Instance and NAT Gateways on @AWSCloud

Create a Virtual Private Cloud, NAT instance and the new NAT Gatweay ... and making it all work. This is a YouTube playlist of three videos.

Cheat sheet to create a #VPC and Subnets on @AWSCloud

One of the critical things to remember for working with a AWS VPC is creating and using it. I had hard time remembering how to do it, so, I wrote down a cheat sheet for myself.  If anyone wants to follow along, just navigate to the VPC page on the AWS Console and start with 'Create VPC' button. Please note that this may cost some dollars if you are not on the free tier. If you are on the free tier and make mistakes, it may cost some dollars. In the steps below, we will be creating the following on a new VPC: An internet gateway One public subnet with routes for accessibility from the internet One private subnet without any routes One EC2 web server with Apache installed in it and serving a sample html page - using the public subnet. One EC2 server with the private subnet and security group that allows access to resources running on the public subnet only.  Create VPC Name tag: myVPC CIDR Block: Tenancy: default (Must have default. Otherwise, it

#AWS Developer Notes - Part 1

Region is geographic area. Each region has availability zones - different data centers. Edge Locations - CDN end points for CloudFront. AWS Platform 1.0 Networking VPC (Virtual Private Cloud) Virtual Data Center in your AWS account. Logically separate network. Direct Connect A way of connecting into AWS environment without using an internet connection.  Route53 DNS service. 53 is the default DNS port. 2.0 Compute EC2 Virtual server provisioned in a few seconds or minutes. EC2 Container Service Scalable fast container management service to manage and run Docker containers. Elastic Beanstalk Easy to use service to deploy and scale apps and services. Designed for developers to upload their code and beanstalk will inspect the code and provision the resources underneath. (Covered in detail for DevOps exam) Lambda Most powerful AWS service. Lets you run code without provisioning or managing servers. Pay for the compute time only

Trying @teamcity for #ContinuousIntegration - Part 3

In part 1, we looked at how to install and create a simple build job in Teamcity. In part 2, we looked at how to create an agent and run a build on the agent. In part 3, we will look at how to build a Maven Java project. We already added the project to the build job in part 2, but we did not configure the build step to actually perform the compilation using Maven. Auto detect build steps It is as good as it sounds. I clicked 'Auto detect build steps' and the build step was automatically created to perform a 'maven clean test'. Check the checkbox in the table and click 'Use selected' to add the build step to your build job. Observe the 'mvn clean test' step in the table. Run the build job Run the build by clicking the 'Run' button at the top of the page. A live status and percentage of completion is shown on the project view. Edit the maven goals Click on the &#

Trying @teamcity for #ContinuousIntegration - Part 2

Continuing from where we got stuck in the prior post for running a build on Trying @teamcity for #ContinuousIntegration - Part 1 . Before I started working on the agent, I deleted two of the three builds in the queue. Create the Teamcity agent I learned that I must have an agent running. I executed the following docker command to create an agent that automatically registered itself on the Teamcity server as an unauthorized agent. docker run -d -e SERVER_URL="http://teamcity-server-instance:8111" \ --name=teamcity-agent \ -p 9090:9090 \ -v $HOME/docker-shares/teamcity/agent/conf:/data/teamcity_agent/conf \ -e AGENT_NAME=teamcity-agent \ --link teamcity-server-instance:TSI \ jetbrains/teamcity-agent Authorize the agent Click on the 'Unauthorized' link next to the agent and click 'Authorize' on the dialog  that pops up. Navigate back to 'Connected' tab where only authorized agents are listed.

Trying @teamcity for #ContinuousIntegration - Part 1

Teamcity is a continuous integration software application from JetBrains . I am a Jenkins expert. I use it at work and I go deep into it with custom plugins and custom code to orchestrate builds and deployments. I use CircleCI and TravisCI for my github projects and these are just for fun. All these products are good in their own way. Jenkins is the mother of all CI tools. CircleCI and TravisCI are simpler to use and I really like the speed and agility of these tools. I would use Jenkins for enterprise and CircleCI/TravisCI for open source public domain projects. I didn't realize that there is a free version of Teamcity until last night and the features are fairly decent. There is a 50% discount for startups and free for open source projects. This is welcoming. Installation Jumping right into it. I downloaded the windows version and the installation was fairly simple with the executable, but I could not get it to work. The browser would just show a blank page. I qu

@Jenkinsci analytics with ELK @elastic on @Docker containers

This is a simplified way of setting up the integration discussed in Jenkins Analytics with Elasticsearch. Step 1: Clone the project from github git clone Step 2: Build the Docker image for Jenkins with the logstash plugin. docker build -t adityai/jenkinselastic-docker . Step 3: Run the or execute the following docker commands sudo docker run --name elasticsearch --hostname elasticsearch -p 9200:9200 -p 9300:9300 -d elasticsearch sudo docker run -p 8080:8080 -p 50000:50000 -v $HOME/jenkins_home:/var/jenkins_home --link elasticsearch:es --name jenkins -d adityai/jenkinselastic-docker sudo docker run -e ELASTICSEARCH_URL=http://elasticsearch:9200 -p 5601:5601 --link elasticsearch:es --name kibana -d kibana

Python basics cheatsheet

Python Basics Cheatsheet Python is an interpreted language. Math, numbers and variables  Mathematical Operators Besides the usual operators (+, -, * and /), Python has exponent ( ** ) and negation ( - as a prefix to a number ). Integers and Floats Integers: 50 Floats: 3.1421 Order of operations   PEMDAS: Parentheses, Exponent, Multiplication, Division, Addition and Subtraction Using Variables   No spaces in the variable name and must start with a character. Python style Pep 8 recommends lowercase words separated by underscore. Rounding import math math.ceil(4.8) // will print 5 Other python libraries Strings Create strings first_name = ‘Aditya’ last_name = ‘Inapurapu’ Concatenate strings full_name = first_name + ‘ ‘ + last_name Print strings // Print one string print(first_name) // Print multiple strings one after the other with a space in between print(first_nam