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 | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ |
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 | |
sudo apt-get update | |
sudo apt-get install \ | |
linux-image-extra-$(uname -r) \ | |
linux-image-extra-virtual -y | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ |
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
[general] | |
# Path to a Public key to install on servers. If a usable key has not | |
# been installed on the remote servers the user will be prompted for a | |
# password and this key will be installed so the password will not be | |
# required again | |
CONFIG_SSH_KEY=/root/.ssh/id_rsa.pub | |
# Set to 'y' if you would like Packstack to install MySQL | |
CONFIG_MYSQL_INSTALL=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
apt-get update && apt-get install -y apt-transport-https curl | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-stretch main | |
EOF | |
apt-get update | |
apt-get install -y kubelet kubeadm kubectl | |
apt-mark hold kubelet kubeadm kubectl |
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 json | |
from jsonrpclib import Server | |
switches = ["172.22.28.156", "172.22.28.157", "172.22.28.158"] | |
username = "admin" | |
password = "admin" | |
# Going through all the switch IP addresses listed above | |
for switch in switches: | |
urlString = "https://{}:{}@{}/command-api".format(username, password, switch) |
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
extern crate hyper; | |
extern crate core; | |
use std::io::Read; | |
use hyper::Client; | |
use hyper::header::Connection; | |
use hyper::header::Basic; | |
use hyper::header::Headers; | |
use core::str::FromStr; |
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
{ | |
"jsonrpc": "2.0", | |
"id": "EapiExplorer-1", | |
"result": [ | |
{ | |
"uptime": 26892007.46, | |
"modelName": "DCS-7050SX-64-R", | |
"internalVersion": "4.21.0F-9441269.4210F", | |
"systemMacAddress": "00:1c:73:7d:2d:fd", | |
"serialNumber": "JPE14140280", |
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 && apt-get install apt-transport-https ca-certificates curl software-properties-common -y | |
## Download GPG key. |
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
# Assumes that subscription manager has been registered and repos added | |
sudo yum -y install wget git net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct | |
sudo yum -y update | |
sudo yum -y install atomic-openshift-utils | |
sudo yum -y install docker |
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
sudo apt-get update && sudo apt-get install -y apt-transport-https curl | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
sudo cat <<EOF >/etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
sudo apt-get update | |
sudo apt-get install -y kubelet kubeadm kubectl | |
sudo apt-mark hold kubelet kubeadm kubectl |
NewerOlder