What is Kubernetes?
- Deploy a Kubernetes cluster on Digital Ocean using kubeadm
#!/usr/bin/env python | |
# coding: utf-8 | |
## Generate HTML reports with D3 graphs using Python, Plotly, and Pandas | |
# You can download the example report that this script generate from this link. | |
# <a href="d3.js">d3.js</a> is an amazing JavaScript library for creating interactive, online graphics and charts. Plotly lets you create d3.js charts using Python, R, or MATLAB. This IPython notebook shows you how to embed these charts in an HTML report that you can then share by email or <a href="">host on a website</a>. |
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests |
Linux Series part 2: File & Folder Permission Management: | |
To see file list, their crrent permission level and much more, you can run: | |
ls -la -lh -lt | |
(To know more on ls commands check tutorial: https://www.youtube.com/watch?v=h6sDtGN5hYs) | |
chmod <specification> filename : Change the file permissions. Specifications = u user/owner, g group, o other, + add permission, - remove, r read, w write,x execute. | |
chmod -R <specification> dir-name: Change the permissions of a directory recursively. To change permission of a directory and everything within that directory, use this command. |
import sys | |
import smtplib | |
from email.MIMEMultipart import MIMEMultipart | |
from email.MIMEText import MIMEText | |
name = "Ruan" | |
from_address = "[email protected]" | |
to_address = "[email protected]" | |
subject = "Test" |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: grafana-config | |
data: | |
grafana.ini: | | |
##################### Grafana Configuration Example ##################### | |
# | |
# Everything has defaults so you only need to uncomment things you want to | |
# change |
import boto3 | |
from termcolor import colored | |
ec2 = boto3.resource('ec2') | |
for i in ec2.instances.all(): | |
print("Id: {0}\tState: {1}\tLaunched: {2}\tRoot Device Name: {3}".format( | |
colored(i.id, 'cyan'), | |
colored(i.state['Name'], 'green'), |
#!/bin/bash | |
yum install -y aws-cli | |
cd /home/ec2-user/ | |
aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1 | |
yum -y install codedeploy-agent.noarch.rpm |