Skip to content

OCI Image Documentation

Steven Dake edited this page Jun 28, 2023 · 2 revisions

There are essential package requirements for OCI's bootable images.

Curated Oracle content

Blogs

OCI documentation

OCI Whitepapers

Oracle Searches

Artificial Cloud Debian Image on Oracle Bare Metal

sdake@beast-05 ~/r/o/p/g/p/00_file (golden/efi)> cat README.md Artificial Wisdom™ Golden Image Overlay for Oracle Cloud Infrastructure

Overview

Oracle platform images are limited to Oracle Linux, Red Hat Enterprise Linux, SUSE, and Ubuntu. Our cloud is built from a Debian baseline. There are many excellent reasons for this which are beyond the scope of this wiki. Oracle Cloud Infrastructure has extensive documentation explaining how to bring your image to Oracle Cloud. None of the code patterns, plus many that were not recorded in this wiki, have the appearance of correctness on bare meal..

Additionally, we have searched extensively for Oracle's Platform Image building process and have been unsuccessful in finding the git repository.

Therefore, we have started the process of reverse engineering the OCI Image building process. We have determined each file that is modified via interpolation includes a comment signature of # CLOUD_IMG.

Create an overlay list

There are several approaches to creating an overlay list. The approach here searches for the signature used to identify modified files. This signature is CLOUD_IMG.

  • Create an instance with the latest Ubuntu GPU-based image on an Intel shape:
TODO
login to the virtual machine
  • Create an archive of the filesystem:

note: the tar flags are not quite right.

sudo tar -czvf /tmp/oracle_cloud_infrastructure_ubuntu_22_04.tar.gz --exclude /tmp --exclude /run --exclude /dev --exclude /proc
exit (to log out of the metal)
  • Copy the archive to a local system:
scp ubuntu@instance_ip:/tmp/oracle_cloud_infrastructure_ubuntu_22_04.tar.gz $HOME
  • extract the archive
mkdir $HOME/oracle_cloud_infrastructure_ubuntu_22_04_rootdisk
pushd $HOME/oracle_cloud_infrastructure_ubuntu_22_04_rootdisk
tar -xzvf $HOME/oracle_cloud_infrastructure_ubuntu_22_04.tar.gz
  • Find all files with signature and copy them to a unique location
mkdir $HOME/artificialwisdom_cloud
grep -rl CLOUD_IMG * | xargs -t -I % install -D % $HOME/artificialwisdom_cloud/%
  • Create an overlay tarball

note: tar flags are not correct.

pushd $HOME/artificialwisdom_cloud
tar -czvf $HOME/repos/origin/platform/golden/provisioners/00_file/artificialwisdom_cloud_oracle_cloud_overlay.tar.gz .
popd
  • Clean up the shell stack
popd
  • Build the Artificial Wisdom™ Cloud golden image

NB Ensure you have a functional installation of Oracle VirtualBox and Packer.

cd $HOME/repos/origin/platform/golden
bash ./run.sh

WARNING The overlay is not usable as is. However, it is a great starting point for followup work.

Clone this wiki locally