Skip to main content

Posts

Showing posts from September, 2016

@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 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 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