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: 10.0.0.0/16 Tenancy: default (Must have default. Otherwise, it
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
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
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.
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
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 https://github.com/adityai/jenkinsElastic-Docker Step 2: Build the Docker image for Jenkins with the logstash plugin. docker build -t adityai/jenkinselastic-docker . Step 3: Run the install.sh 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 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 https://docs.python.org/3.5/library/ 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
Creating a Django project django-admin startproject <project_name> Create an app in a project python manage.py startapp <app_name> Run the project on a server python manage.py runserver Apply migrations on your app python manage.py migrate Import modules in your app In <project_name>/<app_name>/views.py : By default, the following views.py will be in your app folder: from django.shortcuts import render # Create your views here. Add the http module in views.py as shown below: from django.shortcuts import render from django.http import HttpResponse # Create your views here. def index(request): return HttpResponse('<h1>Hello Explorers!</h1>') Map the view to a url The default urls.py file in the <project_name> folder is as follows. from django.conf.urls import url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), ] Ad