Skip to content

Instantly share code, notes, and snippets.

Avatar

Francesco Pantano fmount

View GitHub Profile
@fmount
fmount / Vagrantfile
Created Jun 2, 2022
Standalone OSP and Ceph
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
$tripleo_standalone = <<-'SCRIPT'
export IP=192.168.24.2
export VIP=192.168.24.3
@fmount
fmount / rook_crc_multus.md
Last active May 31, 2022
Notes: Rook / Multus on crc
View rook_crc_multus.md

Bootstrap crc and setup oc tools

wget https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz
sudo tar -xJvf crc-linux-amd64.tar.xz
sudo mv crc-linux-1.22.0-amd64/crc /usr/local/bin/
sudo tar zxf openshift-client-linux.tar.gz -C /usr/local/bin/
@fmount
fmount / expose_crc_dev.md
Last active May 2, 2022
A few notes to setup a development environment based on Code Ready Containers platform
View expose_crc_dev.md

Expose CodeReady container Platform on CentOS

Sizing

  • 4 physical CPU cores
  • 8 GB of free memory
  • 35 GB of storage space

Update and install some required packages

@fmount
fmount / rook_minikube.md
Last active Jun 14, 2022
Expose Rook Ceph cluster and connect OpenStack
View rook_minikube.md

Pt.1: Let's prepare minikube first!

minikube start --force --memory="4096" --cpus="2" -b kubeadm --kubernetes-version="v1.19.2" --driver="kvm2" --feature-gates="BlockVolume=true,CSIBlockVolume=true,VolumeSnapshotDataSource=true,ExpandCSIVolumes=true"

Where rook put all the cluster info?

minikube ssh "sudo mkdir -p /mnt/vda1/var/lib/rook;sudo ln -s /mnt/vda1/var/lib/rook /var/lib/rook"
@fmount
fmount / tempest.conf.sample
Created Mar 11, 2022
Tempest conf sample
View tempest.conf.sample
[network]
default_network = 10.0.0.0/22
public_router_id =
public_network_id =
project_networks_reachable = false
project_network_cidr = 10.0.0.0/22
[DEFAULT]
debug = True
log_file = tempest.log
@fmount
fmount / local.conf
Created Mar 8, 2022
devstack local.conf
View local.conf
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=secret
RABBIT_PASSWORD=secret
SERVICE_PASSWORD=secret
##########
# MANILA #
##########
View manila_csi_operator.patch
diff --git a/assets/controller.yaml b/assets/controller.yaml
index 4177f05..2733cb1 100644
--- a/assets/controller.yaml
+++ b/assets/controller.yaml
@@ -2,7 +2,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: openstack-manila-csi-controllerplugin
- namespace: openshift-manila-csi-driver
+ namespace: manila-csi-driver
@fmount
fmount / standalone_destroy.sh
Last active Nov 18, 2022
Destroy a cephadm deployed Ceph cluster
View standalone_destroy.sh
#!/bin/bash
set -x
fsid="$1"
cephadm rm-cluster --fsid $fsid --force
source /etc/os-release
sudo systemctl stop tripleo_\*
sudo systemctl stop ceph\*
sudo pcs cluster destroy
if [ $VERSION_ID == "7" ]; then
sudo docker ps -a -q | xargs docker rm -f
@fmount
fmount / standalone.sh
Last active Jan 26, 2022
Deploy a standalone OpenStack via TripleO
View standalone.sh
export IP=192.168.24.2
export NETMASK=24
export INTERFACE=eth1
function gen_cont {
openstack tripleo container image prepare default \
--output-env-file "$HOME"/containers-prepare-parameters.yaml
}
function gen_config {
View g_chroot.c
#include <stdio.h>
#include <unistd.h>
int enter_chroot(const char * root) {
/* chroot */
chdir(root);
if (chroot(root) != 0) {
perror("chroot");
return 1;
}