Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UEKR7 Fixes (take 2) #483

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions OCNE/scripts/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,8 @@ install_packages() {

### `nft_masq` is not part of kernel-uek-core since OL8U7. To enable masquerading, we must install kernel-uek-modules
### https://docs.oracle.com/en/operating-systems/uek/7/relnotes7.0/uek7.0-NewFeaturesandChanges.html
if ! [[ ${POD_NETWORK} == "calico" || ${DEPLOY_CALICO} == 1 ]]; then
msg "Installing kernel-uek-modules"
echo_do sudo dnf install -y kernel-uek-modules-$(uname -r)
fi
msg "Installing kernel-uek-modules"
echo_do sudo dnf install -y kernel-uek-modules-$(uname -r)
msg "Installing the OpenSSL toolkit"
echo_do sudo dnf install -y openssl
###
Expand All @@ -375,9 +373,7 @@ install_packages() {
echo_do sudo dnf install -y olcnectl"${OCNE_VERSION}" olcne-api-server"${OCNE_VERSION}" olcne-utils"${OCNE_VERSION}"
echo_do sudo systemctl enable olcne-api-server.service
echo_do sudo firewall-cmd --add-port=8091/tcp --permanent
if ! [[ ${POD_NETWORK} == "calico" || ${DEPLOY_CALICO} == 1 ]]; then
echo_do sudo firewall-cmd --add-masquerade --permanent
fi
echo_do sudo firewall-cmd --add-masquerade --permanent
fi
if [[ ${MASTER} == 1 || ${WORKER} == 1 ]]; then
msg "Installing the Oracle Cloud Native Environment Platform Agent"
Expand Down Expand Up @@ -489,12 +485,12 @@ install_packages() {
fi
fi

if ! [[ ${POD_NETWORK} == "calico" || ${DEPLOY_CALICO} == 1 ]]; then
# Reload firewalld
echo_do sudo firewall-cmd --reload
else
if [[ ${POD_NETWORK} == "calico" || ${DEPLOY_CALICO} == 1 ]]; then
msg "Disable firewalld.service as required by Calico networking"
echo_do sudo systemctl disable --now firewalld.service
else
# Reload firewalld
echo_do sudo firewall-cmd --reload
fi
}

Expand Down Expand Up @@ -783,8 +779,7 @@ deploy_modules() {
--module istio \
--name "${ISTIO_MODULE_NAME}" \
--istio-container-registry "${REGISTRY_OCNE}" \
--istio-helm-module "${HELM_MODULE_NAME}"

--istio-kubernetes-module "${OCNE_CLUSTER_NAME}"

# Validate the Istio module
msg "Validating the Istio module: ${ISTIO_MODULE_NAME}"
Expand Down Expand Up @@ -817,7 +812,7 @@ deploy_modules() {
--environment-name "${OCNE_ENV_NAME}" \
--module metallb \
--name "${METALLB_MODULE_NAME}" \
--metallb-helm-module "${HELM_MODULE_NAME}" \
--metallb-kubernetes-module "${OCNE_CLUSTER_NAME}" \
--metallb-config /vagrant/metallb-config.yaml

msg "Removing MetalLB temporary configuration file"
Expand Down Expand Up @@ -851,7 +846,7 @@ deploy_modules() {
--environment-name "${OCNE_ENV_NAME}" \
--module gluster \
--name "${GLUSTER_MODULE_NAME}" \
--gluster-helm-module "${HELM_MODULE_NAME}" \
--gluster-kubernetes-module "${OCNE_CLUSTER_NAME}" \
--gluster-server-url "${HEKETI_CLI_SERVER}"

# Validate the Gluster module
Expand Down
37 changes: 25 additions & 12 deletions Ocr-Yum-Mirror/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

# change memory size
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.memory = 1024
v.name = NAME
# add second disk device
# add second disk device
file_to_disk = File.realpath( "." ).to_s + "/disk.vdi"

if ARGV[0] == "up" && ! File.exist?(file_to_disk)
v.customize [
'createhd',
'--filename', file_to_disk,
'--format', 'VDI',
'--size', 50 * 1024 # 50 GB
]
if ARGV[0] == "up"
if ! File.exist?(file_to_disk)
v.customize [
'createhd',
'--filename', file_to_disk,
'--format', 'VDI',
'--size', 50 * 1024 # 50 GB
]
end
v.customize [
'storageattach', :id,
'--storagectl', 'SATA Controller', # The name may vary
Expand Down Expand Up @@ -126,8 +128,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "shell", path: "scripts/ocr-mirror.sh", privileged: false

# Share Yum mirror and OCNE mirror access
config.vm.provision "shell", inline: "echo 'INSTALLER: Oracle Linux Yum Mirror is available at http://<host-machine>:8080/yum/'", privileged: false
config.vm.provision "shell", inline: "echo 'INSTALLER: Oracle Container Registry Mirror is available at https://<host-machine>:5000/olcne/'", privileged: false
config.vm.provision "shell", inline: "echo 'INSTALLER: Installation complete, Oracle Linux 8 ready to use!'", privileged: false
config.vm.post_up_message = <<-MSG
Installation complete, Oracle Linux 8 mirror ready to use!

-----------------------------------------------------------
Local Ocr-Yum-Mirror, accessible via:
127.0.0.1 (localhost); or
10.0.2.2 (inside VirtualBox VMs)

URLs:
- OracleLinux8 Yum Repo - http://localhost:8080/yum/
- OCNE 1.6 Docker Registry - https://localhost:5000/olcne/

-----------------------------------------------------------
MSG

end
8 changes: 5 additions & 3 deletions Ocr-Yum-Mirror/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ EOF
echo 'INSTALLER: Locale set'

echo 'INSTALLER: Creating persistent virtual-disk /dev/sdb1'
# persistent disk
printf "o\nn\np\n1\n\n\nw\n" |sudo fdisk /dev/sdb
sudo mkfs.xfs /dev/sdb1
# persistent disk. check if xfs fs already exists
if ! sudo blkid /dev/sdb1 | grep -q "TYPE=\"xfs\""; then
printf "o\nn\np\n1\n\n\nw\n" |sudo fdisk /dev/sdb
sudo mkfs.xfs /dev/sdb1
fi
sudo mkdir -p /var/yum
sudo mount /dev/sdb1 /var/yum
sudo chown vagrant: /var/yum
Expand Down
4 changes: 2 additions & 2 deletions Ocr-Yum-Mirror/scripts/ocr-mirror.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ podman run -d -p 5000:5000 --name ocr-yum-mirror --restart=always \

# add sync script for OCR mirror
cat <<EOF | tee /home/vagrant/sync-ocr.sh
/usr/bin/registry-image-helper.sh --to ocr-yum-mirror:5000/olcne $*
/usr/bin/registry-image-helper.sh --to ocr-yum-mirror:5000/olcne --version 1.25.7
EOF
chmod 700 /home/vagrant/sync-ocr.sh

# collect OCNE container images
/home/vagrant/sync-ocr.sh --version 1.25.7
/home/vagrant/sync-ocr.sh

echo 'OCR MIRROR SETUP: Completed'