Skip to content

Instantly share code, notes, and snippets.

View sahanasj's full-sized avatar

SahanaJSJ sahanasj

View GitHub Profile
@sahanasj
sahanasj / __readme.md
Created May 17, 2019 08:07 — forked from maxivak/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

@sahanasj
sahanasj / __readme.md
Created June 3, 2019 18:22 — forked from dasgoll/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

@sahanasj
sahanasj / backend-spring-application.yaml
Created July 23, 2019 10:00 — forked from shri-kanth/backend-spring-application.yaml
Spring Configuration File of application back-end
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
hikari:
idle-timeout: 10000
platform: mysql
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
url: jdbc:mysql://${DB_HOST}/${DB_NAME}
jpa:
@sahanasj
sahanasj / backEnd.DockerFile
Created July 23, 2019 10:01 — forked from shri-kanth/backEnd.DockerFile
DockerFile for creating application backend image
FROM openjdk:10-jre-slim
RUN mkdir -p /opt/to-do-app/
COPY ./target/to-do-listEntity-app-0.0.1-SNAPSHOT.jar /opt/to-do-app/
WORKDIR /opt/to-do-app/
EXPOSE 8080
CMD ["java", "-jar", "to-do-listEntity-app-0.0.1-SNAPSHOT.jar"]
@sahanasj
sahanasj / frontEnd.DockerFile
Created July 23, 2019 10:03 — forked from shri-kanth/frontEnd.DockerFile
DockerFile to Create Application FrontEnd Image
FROM node:7.7-alpine
# install dependencies
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
# Copy dependencies
RUN mkdir -p /opt/to-do-app && cp -a /tmp/node_modules /opt/to-do-app
# Setup workdir
@sahanasj
sahanasj / backend-deployment.yaml
Created July 23, 2019 11:55 — forked from shri-kanth/backend-deployment.yaml
Configuration of back-end application deployment on Kubernetes
# Define 'Service' to expose backend application deployment
apiVersion: v1
kind: Service
metadata:
name: to-do-app-backend
spec:
selector: # backend application pod lables should match these
app: to-do-app
tier: backend
ports:
@sahanasj
sahanasj / frontend-deployment.yaml
Created July 23, 2019 12:00 — forked from shri-kanth/frontend-deployment.yaml
File describing configuration related to application front-end deployment on Kuberenetes
# Define 'Service' to expose FrontEnd Application
apiVersion: v1
kind: Service
metadata:
name: to-do-app-frontend
spec:
selector: # pod labels should match these
app: to-do-app
tier: frontend
ports:
@sahanasj
sahanasj / backend-configMap.yaml
Created July 23, 2019 12:00 — forked from shri-kanth/backend-configMap.yaml
File exposing configuration related to back-end application Setup
# ConfigMap to expose configuration related to backend application
apiVersion: v1
kind: ConfigMap
metadata:
name: backend-conf # name of configMap
data:
server-uri: 34.66.207.42 # enternal ip of backend application 'Service'
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@sahanasj
sahanasj / linux-networking-tools.md
Created January 28, 2020 07:49 — forked from miglen/linux-networking-tools.md
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED