Skip to content

Commit f2159ae

Browse files
committed
build: add flux usernetes build
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
1 parent 831034d commit f2159ae

File tree

5 files changed

+508
-1
lines changed

5 files changed

+508
-1
lines changed

azure/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### 1. Build Images
66

7-
You can find the instructions for building your bases [here](https://github.com/converged-computing/flux-tutorials/tree/main/tutorial/azure/build) in the flux-tutorials repository. You'll need to create a resource group with your packer image (e.g., packer-testing) and an image (e.g., flux-framework) before continuing here.
7+
You'll need to do the [build](build), first, and before that creating a resource group with your packer image (e.g., packer-testing) and an image (e.g., flux-usernetes) before continuing here.
88

99
### 2. Deploy Terraform
1010

@@ -84,6 +84,7 @@ pssh -h hosts.txt -x "-i ./id_azure" "/bin/bash /tmp/update_brokers.sh flux $lea
8484

8585
Note that if it fails, you need to wait a bit - I usually step away for a second or two to give the VM time to finish setting up.
8686

87+
8788
### 4. Install LAMMPS and OSU
8889

8990
Before we shell in, let's install lammps and the osu benchmarks on "bare metal":
@@ -303,11 +304,21 @@ They are exactly the same, and `UCX_TLS` doesn't seem to matter, but likely you
303304

304305
This is a work in progress - I'm still manually testing with [these scripts](https://github.com/converged-computing/flux-tutorials/tree/add-azure-base/tutorial/azure/install) but it isn't working yet. The container cannot ping hosts outside it, and I don't see vxlan as a loaded module.
305306

307+
```console
308+
script=usernetes
309+
for address in $(az vmss list-instance-public-ips -g terraform-testing -n flux | jq -r .[].ipAddress)
310+
do
311+
echo "Installing ${script} to $address"
312+
scp -i ./id_azure ./install/install_${script}.sh azureuser@${address}:/tmp/install_${script}.sh
313+
done
314+
pssh -h hosts.txt -t 100000000 -x "-i ./id_azure" "/bin/bash /tmp/install_${script}.sh"
315+
```
306316

307317
#### TBA Install Infiniband
308318

309319
At this point we need to expose infiniband on the host to the pods. This took a few steps,
310320
and what I learned (and the instructions are in [the repository here](https://github.com/converged-computing/aks-infiniband-install).
321+
311322
### 9. Cleanup
312323

313324
When you are done:

azure/build/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.PHONY: all
2+
all: init fmt validate build
3+
4+
.PHONY: init
5+
init:
6+
packer init .
7+
8+
.PHONY: fmt
9+
fmt:
10+
packer fmt .
11+
12+
.PHONY: validate
13+
validate:
14+
packer validate .
15+
16+
.PHONY: build
17+
build:
18+
packer build flux-usernetes.pkr.hcl

azure/build/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Build Packer Images
2+
3+
Note that I needed to do this build from a cloud shell, so clone and then:
4+
5+
```bash
6+
git clone https://github.com/converged-computing/flux-tutorials
7+
flux-tutorials/tutorial/azure/build
8+
```
9+
10+
And install packer
11+
12+
```bash
13+
wget https://releases.hashicorp.com/packer/1.11.2/packer_1.11.2_linux_amd64.zip
14+
unzip packer_1.11.2_linux_amd64.zip
15+
mkdir -p ./bin
16+
mv ./packer ./bin/
17+
export PATH=$(pwd)/bin:$PATH
18+
```
19+
20+
Get your account information for azure as follows:
21+
22+
```bash
23+
az account show
24+
```
25+
26+
And export variables in the following format. Note that the resource group needs to actually exist - I created mine in the console UI.
27+
28+
```bash
29+
export AZURE_SUBSCRIPTION_ID=xxxxxxxxx
30+
export AZURE_TENANT_ID=xxxxxxxxxxx
31+
export AZURE_RESOURCE_GROUP_NAME=packer-testing
32+
```
33+
34+
Then build!
35+
36+
```bash
37+
make
38+
```

0 commit comments

Comments
 (0)