This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Docker from Ubuntu's repositories: | |
sudo apt-get update | |
sudo apt-get install -y docker.io | |
# or install Docker CE 18.06 from Docker's repositories for Ubuntu or Debian: | |
## Install prerequisites. | |
sudo apt-get update && sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 start-instances --instance-ids $(aws ec2 describe-instances --filters "Name=tag:Usage,Values=kube" --query 'Reservations[*].Instances[*].[InstanceId]' --output text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib2 | |
import json | |
h = httplib2.Http(".cache") | |
h.add_credentials('admin', 'admin') | |
#resp, content = h.request('http://10.55.17.20:8080/controller/nb/v2/statistics/default/flowstats', "GET") | |
# Updated 8 SEP 2013 to reflect new REST API | |
resp, content = h.request('http://10.55.17.20:8080/controller/nb/v2/statistics/default/flow', "GET") | |
allFlowStats = json.loads(content) | |
flowStats = allFlowStats['flowStatistics'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[local|localrc]] | |
HOST_IP=172.22.28.204 | |
# Interface connected to switch | |
FLAT_INTERFACE=eth1 | |
# Logging settings | |
LOGDAYS=1 | |
LOGFILE=$DEST/logs/stack.sh.log | |
SCREEN_LOGDIR=$DEST/logs/screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed 's/.*/"&\\n",/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
import Data.Aeson | |
import Data.Text | |
import GHC.Generics | |
import Network.Wreq | |
import Control.Lens | |
import qualified Data.ByteString.Lazy as B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$username = "admin" | |
$password = "admin" | |
$switchIp = "172.22.28.157" | |
#URL | |
$eApiUrl = "https://$switchIp/command-api" | |
# Command(s) we want to send | |
$cmds = @('show version') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create an object which represents session options | |
# -SkipCACheck and -SkipCNCheck are used to skip SSL certificate checks | |
$so = New-CimSessionOption -SkipCACheck -SkipCNCheck -UseSsl | |
# Switch credentials | |
$password = ConvertTo-SecureString "password" -AsPlainText -Force | |
$credentials = New-Object System.Management.Automation.PSCredential( "admin", $password ) | |
# Create a session to the switch | |
$switch = "172.22.28.159" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[macvlan] | |
version = "0.1" | |
parent = "bond0.30" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
########################################### | |
### Swarm Global Macvlan Driver Tests ### | |
### ./global-vlan-test.sh <Swarm_IP> ### | |
########################################## | |
# runswarm takes the swarm host:port and network and runs four containers on that network, then removes them | |
function runswarm { | |
echo "Creating four containers on network {$2}" |