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 gatewayOne public subnet with routes for accessibility from the internetOne private subnet without any routesOne 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 VPCName tag: myVPCCIDR Block: 10.0.0.0/16Tenancy: default (Must have default. Otherwise, it will get very expensive quite f…
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.
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. Pay only for execution time. 3.0 StorageS3
Object based storage. Place …
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 'Edit' link on the maven build step row (second column from the right).
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.
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.
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 quickly switched ov…
Python is an interpreted language.
Math, numbers and variables
Besides the usual operators (+, -, * and /), Python has
exponent ( ** ) and negation ( - as a prefix to a number ).
Integers and Floats
Order of operationsPEMDAS: Parentheses, Exponent, Multiplication, Division,
Addition and Subtraction
Using VariablesNo spaces in the variable name and must start with a
character. Python style Pep 8 recommends lowercase words separated by
Rounding import math math.ceil(4.8) //
will print 5
Other python libraries https://docs.python.org/3.5/library/
Create strings first_name =
‘Aditya’ last_name =
Concatenate stringsfull_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
Python scriptExample: script.py first_name =
last_name = ‘Inapurapu’
Creating a Django
Create an app in a project python manage.py
Run the project on a server python manage.py runserver
Apply migrations on your app python manage.py
Import modules in your app
In <project_name>/<app_name>/views.py :
By default, the following views.py will be in your app
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
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), ]
Add a url
to your app in the urlpatterns array. The following example is for adding a url