#Azure Storage
- Instalar jq para parsear json (https://stedolan.github.io/jq/)
- Instalar python con pip https://www.python.org/downloads/windows/ (win)
- Instalar blobxfer
pip install blobxfer
var fs = require('fs'); | |
var ejecutar = function(ruta, fnFichero, fnFinal) { | |
var numFicherosPendientes = 1; | |
var numRecursivas = 0; | |
var procesarCarpeta = function(ruta) { | |
fs.lstat(ruta, function(err, stats) { | |
if (err) { | |
numFicherosPendientes = numFicherosPendientes - 1; |
// Generated on 2014-08-19 using generator-angular 0.9.5 | |
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to recursively match all subfolders: | |
// 'test/spec/**/*.js' | |
module.exports = function (grunt) { |
var http = require('http'); | |
var server = http.createServer(function (request, response) { | |
console.log('Knock knock.'); | |
response.writeHead(200, {"Content-Type": "application/json"}); | |
var data = { 'message' : 'Hello Sweetie' }; | |
response.end(JSON.stringify(data) + '\n'); | |
}); | |
server.listen(8888); |
Container Orchestration with Docker Swarm | |
================================================== | |
Key concepts quick review | |
-------------------------------------------------- | |
+ Images | |
+ Dockerfile | |
+ Docker Hub | |
+ Host |
<html> | |
<head> | |
<title>Prueba de PHP</title> | |
</head> | |
<body> | |
<?php echo '<p>Hola Mundo</p>'; ?> | |
</body> | |
</html> |
#!/bin/bash | |
cat - <<-EOF >> /etc/apt/sources.list.d/webupd8team-java.list | |
# webupd8team repository list | |
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main | |
# deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main | |
EOF | |
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xEEA14886 |
#Azure Storage
pip install blobxfer
#!/bin/bash | |
delete-vpc() { | |
local teamName=${1:-ciberadok8s} | |
local region=${2:-eu-west-1} | |
aws ec2 describe-vpcs --region ${region} | jq -r ".Vpcs[] | select(.Tags[].Value | contains(\"${teamName}\")) | .VpcId" 2>/dev/null | | |
while read vpcID; do | |
echo "# deleting vpc (${vpcID}) ..." | |
# sudo apt update; sudo apt install graphviz | |
# pip3 install diagrams | |
# python3 diagrams-aws.py | |
from diagrams import Cluster, Diagram, Edge | |
from diagrams.aws.compute import EC2 | |
from diagrams.aws.database import RDS | |
from diagrams.aws.network import ELB | |
from diagrams.custom import Custom | |
from urllib.request import urlretrieve |
#!/bin/bash | |
if [[ $# -eq 0 ]] ; then | |
echo 'Provide the name of the owner, please.' | |
exit 0 | |
fi | |
OWNER=$1 | |
VPC_ID=$(aws ec2 create-vpc \ |