This file contains hidden or 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
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface. | |
You can use the user and password that you use for the web interface. | |
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS. | |
You don't need to install it, just extract it or copy the files in "jre" folder. | |
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor. | |
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture. | |
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs. |
This file contains hidden or 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
https://help.ubuntu.com/community/Router#Enable_IP_forwarding_and_Masquerading | |
4.5. Enable IP forwarding and Masquerading | |
Doing the above might not be enough to make the Ubuntu machine a real router which does NAT (Network Address Translation) and IP Forwarding. The following script configures the Kernel IPTable and IP forwarding. You will have to configure at least the script's 2 variables; the 1st is the external network interface; the 2nd is the internal network interface. | |
EXTIF="eth0" | |
INTIF="eth1" | |
The script was originally from a Ubuntu router guide forum article which has 2 internal network interfaces. What's showing below uses only 1 internal network interface. You will have to modify the script manually or use the script in the Ubuntu router guide forum article if you need to configure 2 internal network interfaces. | |
echo -e "\n\nLoading simple rc.firewall-iptables version $FWVER..\n" |
This file contains hidden or 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/sh | |
# USE ON MASTER NODE as UBUNTU/root: | |
export MASTER1="r2-710-01" | |
export MASTER2="r2-710-03" | |
export MASTER3="r2-710-05" | |
export CLIENT_NODES="r2-710-07 r2-710-09 r2-710-11 r2-710-13" | |
export ALL_NODES="r2-710-01 r2-710-03 r2-710-05 r2-710-07 r2-710-09 r2-710-11 r2-710-13" |
This file contains hidden or 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
# To deploy in Openstack ubuntu server LTS instance: | |
sudo apt-add-repository ppa:ubuntu-lxc/stable -y | |
# Using the backports will be supported after the end of 2017, snap is still being developed. As of Nov 28, 2017, backports and regular install are the same. | |
sudo apt update && sudo apt install -y -t xenial-backports lxd lxd-client | |
#sudo apt update && sudo apt install -y lxd lxd-client | |
lxd init --auto | |
# MTU of 1450 is needed for openstack VM. | |
lxc network create lxdbr0 ipv4.address=auto ipv4.nat=true ipv6.address=none ipv6.nat=false bridge.mtu=1450 |
This file contains hidden or 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 | |
source openrc | |
timeout=10 | |
# pip install python-openstackclient | |
# pip install python-novaclient | |
# pip install python-glanceclient | |
# This script will create and download all available images in an openstack cluster under a specific username. | |
# This script has been tested against shellcheck and verified to the best of my abilities to work under any version of shell. |
This file contains hidden or 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 | |
# This script creates all necessary components to start booting VM's in openstack. This includes | |
# - Project | |
# - User | |
# - Networking, subnets, router, | |
# Security group allows | |
# - 22 (SSH) | |
# - IMPI (Ping test) | |
# - 8443 & 8883 (Greengrass rules) |
This file contains hidden or 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
Input math equation and round to 3 decimals: | |
printf %.3f $(echo "$exp" | bc -l) | |
Comparing 3 numbers to find equals/differences: | |
read x | |
read y | |
read z | |
if [[ "$x" -eq "$y" ]] && [[ "$x" -eq "$z" ]] ; then echo EQUILATERAL | |
elif [[ "$x" -eq "$y" ]] || [[ "$x" -eq "$z" ]] || [[ "$y" -eq "$z" ]] ; then echo ISOSCELES | |
else echo SCALENE |
This file contains hidden or 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 | |
import yaml | |
import boto3 | |
gg = boto3.client('greengrass') | |
iot = boto3.client('iot') | |
group = gg.create_group(Name="my_group") | |
keys_cert = iot.create_keys_and_certificate(setAsActive=True) |
This file contains hidden or 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
# Python's list comprehensions are awesome. | |
vals = [expression | |
for value in collection | |
if condition] | |
# This is equivalent to: | |
vals = [] | |
for value in collection: |
This file contains hidden or 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
__author__ = 'Cody Giles' | |
__license__ = "Creative Commons Attribution-ShareAlike 3.0 Unported License" | |
__version__ = "1.0" | |
__maintainer__ = "Cody Giles" | |
__status__ = "Production" | |
import subprocess | |
import smtplib | |
from email.mime.text import MIMEText | |
import datetime |