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

add old archived docs from original nerc-docs repo #236

Merged
merged 1 commit into from
Jan 10, 2025
Merged
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
76 changes: 76 additions & 0 deletions docs/archived/devstack_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
## To build Devstack environment
Complete documentation for devstack can be foudn at: https://docs.openstack.org/devstack/latest/

Bellow are some quick notes based on experience of installing Devstack environment on MOC
### Create the VM in horizon:
Launch new instance:
- 4 core, 8GB ram, 40GB disk (m1.large flavor on MOC)
- ubuntu 20.04.2 LTS Focal ( also works on ubuntu 18.04.2 LTS buster)
- ssh_only security group

After host is created:
- add a public IP address

### Log into the VM and perform the devstack installation:
```sh
ssh ubuntu@*VM_PUBLIC_IP_ADDRESS*
sudo useradd -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
sudo su - stack
git clone https://opendev.org/openstack/devstack
```
edit ~stack/devstack/local.conf (**consider setting your own password instead of "secret"**)

```
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
```

back to commadline:
```sh
cd ~/devstack
screen (or tmux as you prefer)
script -f devstack-install.log
date
./stack.sh
```
50 minutes
```sh
exit (to stop typescript)
exit (to exit screen or tmux)
```
## Things to do after the install:
### Check if the services are running:
```sh
sudo systemctl status "devstack@*"
```
### Give yourself direct access to stack account:
Instead of logging in as user "ubuntu" and then running sudo to user "stack", you can copy your ssh config and login to the server directly as user "stack" by doing the following
```sh
sudo mkdir ~stack/.ssh/
sudo cp ~ubuntu/.ssh/authorized_keys ~stack/.ssh/authorized_keys
sudo chown -R stack:stack ~stack/.ssh
```
### Access the web interface:

From your local computer create ssh tunnel, instead of XXXX use a number above 1024
```sh
ssh stack@*VM_PUBLIC_IP_ADDRESS* -L XXXX:localhost:80
```
point your browser to http://localhost:XXXX (use same number as the one in ssh command)

### Access devstack via CLI

on your devstack VM
```sh
source ~stack/devstack/userrc_early
openstack network list
```

There are python CryptographyDeprecationWarning messages printed everytime openstack command is run. These can be surprseed by:
```sh
export PYTHONWARNINGS=ignore
```
10 changes: 10 additions & 0 deletions docs/archived/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Title: NERC Example Doc
Date: 2021-03-29 15:33
Modified: 2021-03-29 15:33
Category: Example
Tags: pelican, publishing
Slug: nerc-example-doc
Authors: Justin Riley
Summary: NERC example summary (for index and feeds)

This is only a test.
Empty file.
67 changes: 67 additions & 0 deletions docs/archived/m915-openstack-images/build-modified-boot-images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Scripts to rebuild RHOSP introspect and deploy images.

## Pre-prequisites:

RHEL 8.2 host with spax and libguestfs-tools installed, libgcrypt RPM updated to
version 1.8.5-4 or newer. libvird service needs to be running.

An mpt3sas driver compiled for the matching version of the kernel. (refer to
documentation in gitlab on how to do so)

Initial RHOSP introspect and deploy images[1]. Can be obtained from
rhosp-director-images and rhosp-director-images-ipa RPMs or copied from an
existing deployment

```sh
scp stack@nerc-undercloud01:/usr/share/rhosp-director-images/overcloud-full-latest-16.1.tar .
scp stack@nerc-undercloud01:/usr/share/rhosp-director-images/ironic-python-agent-latest-16.1.
tar .
```

## Prep for building images:

Create a directory to work in and set MYWDIR variable to that directotry.

Clone scripts from build_images_scripts directory to it.

Inside MYWDIR create a src_extracted directory and place:

- ironic-python-agent.kernel
- ironic-python-agent.initramfs
- overcloud-full.vmlinuz
- overcloud-full.initrd
- overcloud-full.qcow2
- mpt3sas.ko.xz

You can collect the files from tar arcvhies referenced in pre-requisites
section. Building of mpt3sas driver is outside of scope of this document,
reference *content/m915-openstack-images/build-mpt3sas-kernel-driver.md* in
nerc-docs.

## Build images:
```sh
cd $MYWDIR
./mk_intrspct_img.sh
./mk_deploy_img.sh
./mk_qcow.sh
```
Watch for errors. There are tmp files left around for additional validation and
verification.

If process succeeds $MYWDIR/built directory should contain the following:

- ironic-python-agent-custom.kernel
- ironic-python-agent-custom.initramfs
- overcloud-full-custom.vmlinuz
- overcloud-full-custom.initrd
- overcloud-full-custom.qcow2

Files in the $MYWDIR/built directory are to be sent to nerc-undercloud01 for
upload into glance.



## documents used for creating this process
[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/director_installation_and_usage/installing-the-undercloud#sect-Obtaining_Images_for_Overcloud_Nodes
[2] https://unix.stackexchange.com/questions/163346/why-is-it-that-my-initrd-only-has-one-directory-namely-kernel
[3] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/partner_integration/overcloud_images
23 changes: 23 additions & 0 deletions docs/archived/m915-openstack-images/build-mpt3sas-kernel-driver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# building updated mpt3sas driver for rhel 8.2 openstack introspection and deploy images


## short version

unpack archive cotnaining all pre-requisites and run the build script in the container

```sh
tar xvfz mpt3sas_build.tar.gz
cd mpt3sas_build
podman run -v `pwd`:/build:Z -it ubi8 /build/build.sh
```
grab mpt3sas_build/output/mpt3sas.ko and move onto updating Openstack images.

## long version (components)

***mpt3sas_build/rpms*** directory contains rpms that are not available in ubi8 container repos. They require a fully licenses RHEL8 system to access (possibly there's a solution to this, but after a day of debugging had to move on). The kernel-dev rpm has to match version of the kernel that is used in OpenStack introspection and deploy images (use `file vmlinuz` command against the kernel image to see what version that is) In this case (07/06/2021) we are building for version 4.18.0-193.51.1.el8_2

***mpt3sas_build/src*** directory contains custom mpt3sas source rpm (kmod-mpt3sas-34.100.00.00-1nerc.el8.src.rpm) as well as original ELREPO files that were used to make it. kmod-mpt3sas-34.100.00.00-1nerc.el8.src.rpm cotains modifications needed to compile for specific version of the kernel. This will likely change and will have to be ported for updated kernel. For 4.18.0-193.51.1.el8_2, I included aa-port-to-4.18.0-193.14.3.el8_2.patch as well as appropriate updates to the SPEC file. Also included is the orginal distrubiton of the driver from https://elrepo.org/linux/dud/el8/x86_64/dd-mpt3sas-34.100.00.00-1.el8_3.elrepo.iso

***mpt3sas_build/build.sh*** scripts includes all the steps to perform the build process inside of an ubi8 container including installing the pre-requesites.

***mpt3sas_build/output*** directory will contain mpt3sas.ko, which is the only file that we need to get out of this process.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh -e

KVER=4.18.0-193.51.1.el8_2

if [ -z $MYWDIR ]
then
echo "Check MYWDIR environment variable"
exit 1
elif [ ! -d $MYWDIR/src_extracted ]
then
echo "Missing $MYWDIR/src_extracted directory"
exit 1
elif [ ! -f /bin/pax ]
then
echo "Missing utility, need to run: 'dnf install spax'"
exit 1
fi

mkdir $MYWDIR/tmp.overcloud-full.initrd
cd $MYWDIR/tmp.overcloud-full.initrd
/usr/lib/dracut/skipcpio $MYWDIR/src_extracted/overcloud-full.initrd |zcat | cpio -ivd |pax -r
cp -f lib/modules/$KVER.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko.xz lib/modules/$KVER.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko.xz.orig
cp -f $MYWDIR/src_extracted/mpt3sas.ko.xz lib/modules/$KVER.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko.xz
mkdir lib/modules/$KVER.x86_64/orig
cp lib/modules/$KVER.x86_64/modules.* lib/modules/$KVER.x86_64/orig/
depmod -b $MYWDIR/tmp.overcloud-full.initrd $KVER.x86_64
find . 2>/dev/null | cpio --quiet -c -o | gzip -8 > $MYWDIR/built/overcloud-full-custom.initrd

cp $MYWDIR/src_extracted/overcloud-full.vmlinuz $MYWDIR/built/overcloud-full-custom.vmlinuz
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh -e

KVER=4.18.0-193.51.1.el8_2

if [ -z $MYWDIR ]
then
echo "Check MYWDIR environment variable"
exit 1
elif [ ! -d $MYWDIR/src_extracted ]
then
echo "Missing $MYWDIR/src_extracted directory"
exit 1
fi

mkdir $MYWDIR/tmp.ironic-initrd
cd $MYWDIR/tmp.ironic-initrd
zcat $MYWDIR/src_extracted/ironic-python-agent.initramfs |cpio -id
cp -f lib/modules/$KVER.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko.xz lib/modules/$KVER.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko.xz.orig
cp -f $MYWDIR/src_extracted/mpt3sas.ko.xz lib/modules/$KVER.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko.xz
mkdir lib/modules/$KVER.x86_64/orig
cp lib/modules/$KVER.x86_64/modules.* lib/modules/$KVER.x86_64/orig/
depmod -b $MYWDIR/tmp.ironic-initrd $KVER.x86_64
mkdir -p $MYWDIR/built
find . 2>/dev/null | cpio --quiet -c -o | gzip -8 > $MYWDIR/built/ironic-python-agent-custom.initramfs
cp $MYWDIR/src_extracted/ironic-python-agent.kernel $MYWDIR/built/ironic-python-agent-custom.kernel
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/sh -e

KVER=4.18.0-193.51.1.el8_2

if [ -z $MYWDIR ]
then
echo "Check MYWDIR environment variable"
exit 1
elif [ ! -d $MYWDIR/src_extracted ]
then
echo "Missing $MYWDIR/src_extracted directory"
exit 1
elif [ ! -f /bin/guestmount ]
then
echo "Missing utility, need to run: 'dnf install libguestfs-tools'"
echo "also run: 'systemctl start libvirtd'"
echo "and 'dnf update libgcrypt'"
exit 1
elif [ `rpm -q libgcrypt` != "libgcrypt-1.8.5-4.el8.x86_64" ]
then
echo "untested version of ligcrypt found. test guestmount by hand, and update gcrypt or fix this script"
exit 1
fi

cd $MYWDIR

mkdir -p /tmp/img_mount
mkdir -p /tmp/img_build
cp $MYWDIR/src_extracted/overcloud-full.qcow2 /tmp/img_build/overcloud-full-custom.qcow2

#### investigate if this helps to use different paths or run in containers?
#### keep commented out until then
###export LIBGUESTFS_BACKEND=direct'


guestmount -a /tmp/img_build/overcloud-full-custom.qcow2 -m /dev/sda /tmp/img_mount

TARGET_MODULE_DIR=/tmp/img_mount/lib/modules/$KVER.x86_64
TARGET_DRIVER=$TARGET_MODULE_DIR/kernel/drivers/scsi/mpt3sas/mpt3sas.ko.xz

cp $TARGET_DRIVER $TARGET_DRIVER.orig
cp $MYWDIR/src_extracted/mpt3sas.ko.xz $TARGET_DRIVER

mkdir $TARGET_MODULE_DIR/orig
cp $TARGET_MODULE_DIR/modules.* $TARGET_MODULE_DIR/orig/

#depmod -b /tmp/img_mount $KVER.x86_64
mv /tmp/img_mount/boot/initramfs-$KVER.x86_64.img /tmp/img_mount/boot/initramfs-$KVER.x86_64.img.bak
cp $MYWDIR/built/overcloud-full-custom.initrd /tmp/img_mount/boot/initramfs-$KVER.x86_64.img

guestunmount /tmp/img_mount
sync
sleep 5
sync

virt-customize --selinux-relabel -a /tmp/img_build/overcloud-full-custom.qcow2 --run-command "depmod $KVER.x86_64"
virt-sysprep --operation machine-id -a /tmp/img_build/overcloud-full-custom.qcow2

cp /tmp/img_build/overcloud-full-custom.qcow2 $MYWDIR/built/
10 changes: 10 additions & 0 deletions docs/archived/m915-openstack-images/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This documentation area describes processes for building and deploying custom openstack images capable of supporting dell m915 nodes.


build-modified-boot-images.md - describes making the boot images themselves

build-mpt3sas-kernel-driver.md - describes compiling kernel driver to a version that is compatible with one used by openstack images

build-m915-nodes.md - describes steps to upload and enagae new images when deploying m915 blades

mpt3sas_build.tar.gz - files and scripts needed to build mpt3sas driver
Loading
Loading