Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
df93e3c
WIP: local testing edits to build-bioimage.yml update nextflow and ja…
Mitchob Dec 9, 2025
72d486d
updated ansible_env_vars to force packer to enable aftp and use_proxy…
Mitchob Dec 10, 2025
f735cd4
Fix http and port in CVMFS config
Mitchob Jan 12, 2026
1bf195b
Document how to download the OpenStack RC file from the dashboard and…
Mitchob Jan 22, 2026
d6afb66
docs: add docs/ and ignore local OpenStack credentials
Mitchob Jan 22, 2026
5f4fe00
Delete build/openstack-bioimage.pkr.hcl
Mitchob Jan 22, 2026
5c9a6f8
move bioimage tool descriptions to logical position in readme
Mitchob Jan 23, 2026
f74e5b2
fix github address
Mitchob Jan 27, 2026
f1b9da4
Added instructions for spinning up and logging into a VM
Mitchob Jan 27, 2026
098241e
update activation step in image build to include sanity check
Mitchob Jan 27, 2026
53b484c
move activation sanity check earlier in instructions
Mitchob Jan 27, 2026
47a5d24
remove repitition from introduction to bioimage
Mitchob Jan 28, 2026
8983747
Editing readme to be about what the bioimage is and how to build it o…
Mitchob Jan 28, 2026
366b883
added instuctions of variables that require updating in build step
Mitchob Jan 28, 2026
b2be710
adding clarifications in Build bioimage step based on learnings on Ne…
Mitchob Jan 29, 2026
439d663
Template OpenStack Packer config by removing environment-specific values
Mitchob Feb 1, 2026
cbb62fb
added and example nirin OpenStack Packer config - preconfigures flavo…
Mitchob Feb 1, 2026
abdfb90
Added examples folder for nirin and nectar tested packer configs to p…
Mitchob Feb 1, 2026
c49ac73
moved to examples folder
Mitchob Feb 1, 2026
bf2ebcf
update build section, with reference to tested examples on nirin and …
Mitchob Feb 2, 2026
6c8b155
update Nirin and Nectar example build configs
Mitchob Feb 2, 2026
ba87135
fix(ansible): add retry logic and lock wait for apt update. Updated C…
Mitchob Feb 2, 2026
45a446d
update build instructions to point to nirin/nectar examples and clrif…
Mitchob Feb 2, 2026
c70527b
update build instructions to point to nirin/nectar examples and clrif…
Mitchob Feb 2, 2026
ac04bf8
remove redundant statement
Mitchob Feb 2, 2026
5bc47d6
adding instructions to use main readme for deprecated nirin docs
Mitchob Feb 2, 2026
81b4391
update build image step. split step 2, added removed markdown syntax …
Mitchob Feb 5, 2026
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
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Credentials / secrets
*.pem
*-openrc.sh
openrc.sh

# Logs
*.log
packerlog.txt

# Virtual environments / local tooling
openstack_cli/
.venv/
venv/
418 changes: 282 additions & 136 deletions README.md

Large diffs are not rendered by default.

44 changes: 32 additions & 12 deletions build/build-bioimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,23 @@
become: true

tasks:
- name: Wait for apt lock to be released
become: true
shell: |
while fuser /var/lib/apt/lists/lock >/dev/null 2>&1 || \
fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1 || \
fuser /var/lib/dpkg/lock >/dev/null 2>&1; do
sleep 5
done
changed_when: false

- name: Update apt repository
apt:
update_cache: yes
register: apt_update
retries: 3
delay: 10
until: apt_update is succeeded

- name: Ensure necessary packages are installed
apt:
Expand Down Expand Up @@ -157,12 +171,21 @@
git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git /usr/local/spack

# Intall Nextflow
- name: Ensure Java is installed
- name: Install Java 21 (required for Nextflow)
apt:
name: openjdk-11-jdk
name: openjdk-21-jdk
state: present
become: yes
when: ansible_os_family == "Debian"

- name: Ensure Java 21 is default JVM
alternatives:
name: java
path: /usr/lib/jvm/java-21-openjdk-amd64/bin/java
become: yes
when: ansible_os_family == "Debian"


# Make Nextflowfolder
- name: Create Nextflow folder
shell: |
Expand All @@ -186,11 +209,12 @@

- name: Verify Nextflow installation
shell: |
export NXF_DIST=/apps/nextflow/24.10.2/framework
export CAPSULE_CACHE_DIR=/apps/nextflow/24.10.2/capsule
export PATH=/apps/nextflow/24.10.2/bin:${PATH}
nextflow -version
chmod 0664 /apps/nextflow/24.10.2/framework/24.10.2/nextflow-24.10.2-one.jar
export NXF_VER=24.10.2
export NXF_AUTOINSTALL=false
export NXF_DIST=/apps/nextflow/24.10.2/framework
export CAPSULE_CACHE_DIR=/apps/nextflow/24.10.2/capsule
export PATH=/apps/nextflow/24.10.2/bin:${PATH}
nextflow -version
register: nextflow_version

- name: Clean up temporary files
Expand Down Expand Up @@ -361,7 +385,7 @@
dest: /etc/cvmfs/default.local
content: |
CVMFS_REPOSITORIES=data.biocommons.aarnet.edu.au,data.galaxyproject.org,singularity.galaxyproject.org
CVMFS_HTTP_PROXY='cvmfs-proxy-1.nci.org.au;cvmfs-proxy-2.nci.org.au'
CVMFS_HTTP_PROXY='DIRECT'
CVMFS_QUOTA_LIMIT=4096
CVMFS_USE_GEOAPI=yes

Expand Down Expand Up @@ -441,10 +465,6 @@
- name: setup cvmfs and probe resources
shell: |
cvmfs_config setup
cvmfs_config probe cvmfs-config.cern.ch
cvmfs_config probe data.biocommons.aarnet.edu.au
cvmfs_config probe data.galaxyproject.org
cvmfs_config probe singularity.galaxyproject.org

- name: Update PATH to remove /usr/local/games and add /usr/local/spack/bin
lineinfile:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,27 @@ packer {

source "openstack" "ubuntu" {
image_name = "bioimage"
flavor = "c3.1c2m10d"
availability_zone = "CloudV3"
source_image = "27e044c0-5ce7-4adc-8d95-73aa229a3e2f"
flavor = "r3.small"
source_image = "c0250c96-98a4-4bfa-b67c-51874808337f"
ssh_username = "ubuntu"
volume_size = 20
}

build {
sources = ["source.openstack.ubuntu"]

provisioner "ansible" {
playbook_file = "./build-bioimage.yml"
extra_arguments = ["--extra-vars", "ansible_user=ubuntu"]
}
provisioner "ansible" {
playbook_file = "./build-bioimage.yml"

extra_arguments = [
"--extra-vars", "ansible_user=ubuntu"
]

ansible_env_vars = [
"ANSIBLE_HOST_KEY_CHECKING=False",
"ANSIBLE_SCP_IF_SSH=True"
]

use_proxy = false
}
}
42 changes: 42 additions & 0 deletions build/examples/openstack-bioimage-nirin.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
packer {
required_plugins {
openstack = {
version = ">= 1.1.2"
source = "github.com/hashicorp/openstack"
}

ansible = {
version = ">= 1.1.1"
source = "github.com/hashicorp/ansible"
}
}
}

source "openstack" "ubuntu" {
image_name = "bioimage"
flavor = "c3.1c2m10d"
networks = [""] # update via: openstack network list - select network associated with your project
availability_zone = "CloudV3"
source_image = "68b8635c-9ae8-457a-afd6-b8609a36bf66"
ssh_username = "ubuntu"
volume_size = 20
}

build {
sources = ["source.openstack.ubuntu"]

provisioner "ansible" {
playbook_file = "./build-bioimage.yml"

extra_arguments = [
"--extra-vars", "ansible_user=ubuntu"
]

ansible_env_vars = [
"ANSIBLE_HOST_KEY_CHECKING=False",
"ANSIBLE_SCP_IF_SSH=True"
]

use_proxy = false
}
}
42 changes: 42 additions & 0 deletions build/openstack-bioimage.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
packer {
required_plugins {
openstack = {
version = ">= 1.1.2"
source = "github.com/hashicorp/openstack"
}

ansible = {
version = ">= 1.1.1"
source = "github.com/hashicorp/ansible"
}
}
}

source "openstack" "ubuntu" {
image_name = "bioimage"
flavor = "" # update via: openstack flavor list
networks = [""] # update via: openstack network list
availability_zone = "" # update via: openstack availability zone list
source_image = "" # update via: openstack image list
ssh_username = "ubuntu"
volume_size = 20
}

build {
sources = ["source.openstack.ubuntu"]

provisioner "ansible" {
playbook_file = "./build-bioimage.yml"

extra_arguments = [
"--extra-vars", "ansible_user=ubuntu"
]

ansible_env_vars = [
"ANSIBLE_HOST_KEY_CHECKING=False",
"ANSIBLE_SCP_IF_SSH=True"
]

use_proxy = false
}
}
176 changes: 176 additions & 0 deletions docs/DEPRECATED_old_guid_nirin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@

### ⚠️ **DEPRECATED — UNDER REVIEW**
This document is currently outdated and should not be used. It may be updated in the future.
please refer to the main [README.md](../README.md) for instructions on building an image.


## Instance Management

### Create Instances and Boot Image
You may follow the [Nirin Quick Start Guide](https://opus.nci.org.au/spaces/Help/pages/152207474/Nirin+-+Quick+Start+Guide) , or use the script to create instances
```
cd bioimage/manage
./openstack/create-instances-with-image.sh
```
Comment on lines +9 to +14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not really clear what you're expecting me to do here. Am I spinning up a vm first and then running the script? If so, can you explain what flavour etc i need to spin up.

Also provide git clone instruction for this repo before cd bioimage/manage.

Copy link
Collaborator Author

@Mitchob Mitchob Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is old documentation that I am replacing in the main README.md. I have added instructions to direct users to the main readme and labelled the doc deprecated for now


If instance creation fails using an image, create **bootable volumes** instead:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would the build fail? Is this common or would it only happen if i did something wrong?


1. In the dashboard, create a volume with "Image" as the source.
![Create a Volume](screenshots/nirin-1.jpg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image doesnt render


Once the volumes are created, you can launch instances from them.Use the NCI Cloud Dashboard to create volumes and assign them a consistent prefix (e.g., `training-VM-1`, `training-VM-2`, etc.).

2. Launch instances using existing volumes.
To launch instances via dashboard, fill out the required sections: `Details`, `Source`, `Falvour`, and `Key pair`. In the **Source** section, select the option to boot from an existing volume.
![Launch an instance](screenshots/nirin-2.jpg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image doesnt render


For bulk operations:
```
cd bioimage/manage
./openstack/create-bootable-volumes.sh
./openstack/create-instances-with-volume.sh <key-pair> <VM-prefix>
```

### Shut Down and Restart Instances
Stop instances when they are not in use and restart them as needed.
```
./openstack/instances-start.sh <VM-prefix>
./openstack/instances-stop.sh <VM-prefix>
```

### Tools available in Bioimage

#### modules

The image should include the following applications:
- Singularity
- SHPC
- Spack
- Ansible
- Jupyter Notebook
- RStudio
- Nextflow
- Snakemake
- CernVM-FS client

Check available modules with:
```
module avail
```

To use an application, load it with:
```
module load <app>
```
#### CernVM-FS (CVMFS)

This image uses CernVM-FS (CVMFS) to provide access to shared bioinformatics software and datasets without installing them locally on the VM.

Access CVMFS repositories:
```
ls /cvmfs/data.biocommons.aarnet.edu.au
ls /cvmfs/data.galaxyproject.org
ls /cvmfs/singularity.galaxyproject.org

```
For an explanation of what CVMFS is, how it works, and how it is used in BioImage, see [CVMFS documentation](docs/cvmfs.md).


## User Access

### Single User per Instance

#### Step 1: Generate passwords and Update IP Information
Generate passwords for each user and update the inventory file with the password and instance IPs.
```
cd bioimage/manage
python3 python/update-IP.py <VM-prefix> <project-id>
python3 python/update-keys.py <VM-prefix>
```

#### Step 2: Create Users and Enable Password Access
Add the `training` user with the generated passwords and enable password access.
```
ansible-playbook ./ansible/users-create-1-1.yml
ansible-playbook ./ansible/ssh-password-enable.yml
```

#### Step 3: Associate Floating IPs and Save VM Information
Create and associate floating IPs with the instances for public access. Save the username, password and public IP information in the `VMs` folder.
```
./openstack/floating-IP-create.sh <VM-prefix>
python3 python/list-VM-info.py <VM-prefix> # Save each VM details to a txt file
python3 python/save-VM-info-csv.py <VM-prefix> # Or, save all VMs details to a csv file
```

#### Step 4: Delete Users, Disable Password and Public IP Access
After the training session, delete the `training` user accounts, disable password access and disacciate public IP.
```
ansible-playbook ./ansible/users-delete.yml
ansible-playbook ./ansible/ssh-password-disable.yml
./openstack/floating-IP-delete.sh <VM-prefix>
```

#### Step 5: Optional – Shut Down the Instances
Shut down the instances when they are not in use.
```
./openstack/instances-stop.sh <VM-prefix>
```

### Multiple Users per Instance
When multiple users need to share the same instance, follow these steps:

#### Step 1: Step 1: Generate passwords and Update IP Information
Manually specify the number of users and generate their passwords.

1. Generate password keys:
```
cd bioimage/manage
python3 python/generate-keys.py
```

Update the file `host_vars/[VM-name].yml` with the generated passwords. Sample files are provided.

2. Rename the inventory file and update IPs:
Rename the `inventory.n` file to `invenroty` and run the command:
```
python3 python/update-IP.py <VM-prefix> <project-id>
```

#### Step 2: Create Users and Enable Password Access
Create all the users and enable password access for them:
```
ansible-playbook ./ansible/users-create-n-1.yml
ansible-playbook ./ansible/ssh-passwords-enable.yml
```

#### Step 3: Associate Floating IPs and Save VM Information
Create and associate floating IPs with the instances for public access.
```
./openstack/floating-IP-create.sh <VM-prefix>
```

#### Step 4: Delete Users and Disable Password and Public IP Access
After the training session, remove user accounts, disable password access.
```
ansible-playbook ./ansible/users-delete-all.yml
ansible-playbook ./ansible/ssh-password-disable.yml
```

#### Step 5: Optional – Shut Down the Instances
Shut down the instances when they are not in use.
```
./openstack/instances-stop.sh <VM-prefix>
```

### Install New Tools
`ansible/install-tools.yml` is an example script to install `tree`. Modify it to install more tools for all the VMs.
```
ansible-playbook ./ansible/install-tools.yml
```

### Set Up Home Directory
Use `ansible/set-home-dir.yml` as an example to set up a custom Home directory for training users. Modify it as needed.
```
ansible-playbook ./ansible/set-home-dir.yml
```
Loading