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
#!/usr/bin/env bash | |
# ex8_openstack_devstack_ubuntu.sh | |
set -euo pipefail | |
require_root() { [ "$(id -u)" -eq 0 ] || { echo "Run as root (sudo)"; exit 1; }; } | |
require_root | |
# Update system and install prerequisites | |
DEBIAN_FRONTEND=noninteractive apt-get update -y | |
DEBIAN_FRONTEND=noninteractive apt-get install -y git sudo curl python3-pip |
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
#!/usr/bin/env bash | |
# ex9_linux_bridge_temp.sh — Temporary Linux bridge using brctl | |
# Usage: sudo ./ex9_linux_bridge_temp.sh [IFACE enp0s3] [IP 10.0.2.15/24] [GW 10.0.2.2] | |
set -euo pipefail | |
IFACE="${1:-enp0s3}" | |
IPCIDR="${2:-10.0.2.15/24}" | |
GW="${3:-10.0.2.2}" | |
BR="br-cloud" |
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
#!/usr/bin/env bash | |
# Usage: sudo ./ex8_openstack_devstack.sh | |
set -euo pipefail | |
require_root() { [ "$(id -u)" -eq 0 ] || { echo "Run as root (sudo)"; exit 1; }; } | |
require_root | |
DEBIAN_FRONTEND=noninteractive apt-get update -y | |
DEBIAN_FRONTEND=noninteractive apt-get install -y git sudo |
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 org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.IntWritable; | |
import org.apache.hadoop.io.Text; | |
import org.apache.hadoop.mapreduce.Job; | |
import org.apache.hadoop.mapreduce.Mapper; | |
import org.apache.hadoop.mapreduce.Reducer; | |
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; | |
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; |
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 | |
# Define variables | |
HADOOP_VERSION="3.3.6" # Replace with the desired Hadoop version | |
HADOOP_URL="https://downloads.apache.org/hadoop/common/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz" | |
HADOOP_DIR="/usr/local/hadoop" | |
JAVA_HOME_PATH=$(readlink -f /usr/bin/java | sed "s:/bin/java::") | |
# Update package repository and install prerequisites | |
echo "Updating package repository..." |