Skip to content

Commit

Permalink
Merge pull request #21 from stfc/add_image_create_notes
Browse files Browse the repository at this point in the history
DOC: Add extra notes for uploading the image to readme
  • Loading branch information
meoflynn authored Aug 21, 2024
2 parents 5693957 + ef8dcd9 commit 8fa9654
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
7 changes: 4 additions & 3 deletions amphora-image-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM ubuntu:latest
FROM ubuntu:20.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3-pip python3-virtualenv git sudo \
qemu-utils git kpartx debootstrap curl
python3-pip python3-virtualenv python3-pkg-resources git sudo \
qemu-utils git kpartx debootstrap curl && \
apt-get clean all

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
7 changes: 6 additions & 1 deletion amphora-image-builder/README
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ Usage
-----

```
$ ./build.sh
./build.sh

# Set as appropriate to your environment
export TARGET_PROJECT=service

openstack image create --property hw_disk_bus=virtio --property hw_scsi_model=virtio-scsi --property hw_vif_multiqueue_enabled=true --private --project $TARGET_PROJECT --disk-format raw --container-format bare --file amphora-x64-haproxy.raw --progress amphora-x64-$(date +%Y-%m-%d)-haproxy
```
7 changes: 5 additions & 2 deletions amphora-image-builder/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/bin/bash

set -e
set -euxo pipefail

cd /tmp
python3 -m virtualenv octavia_disk_image_create
# shellcheck source=/dev/null
source octavia_disk_image_create/bin/activate

git clone --depth=1 https://github.com/openstack/octavia
DIB_REPO_PATH="$(pwd)/octavia"
export DIB_REPO_PATH

cd octavia/diskimage-create
pip3 install -r requirements.txt

./diskimage-create.sh -t raw -o "/output/amphora-x64-$(date +"%Y-%m-%d")-haproxy.raw"

0 comments on commit 8fa9654

Please sign in to comment.