Skip to content

Commit

Permalink
docs(sztp): update instructions with new generate.sh script
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb authored Jun 6, 2024
1 parent 519485b commit d99c9aa
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions sztp.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,39 @@ Took from <https://github.com/opiproject/sztp>

## Run on Management server

Start Bootstrap and Web servers from [compose](./docker-compose.yml):
Find the correct Bootsrap port:

```bash
docker compose up -d
root@mgmt:~# grep SZTPD_SBI_PORT ~/lab/docker-compose.yml
SZTPD_SBI_PORT: 8080
```

Add SZTP options to your DHCP server [config](./hardware/mgmt/fs/etc/dhcp/dhcpd.conf), [for example](https://github.com/opiproject/sztp/blob/main/dhcp/dhcpd.conf.template):
Add SZTP options to your DHCP server [config](./hardware/mgmt/fs/etc/dhcp/dhcpd.conf), [for example](https://github.com/opiproject/lab/blob/519485bc141ae8dfcf10e9fb5b844e0fda76c915/hardware/mgmt/fs/etc/dhcp/dhcpd.conf#L14-L15):

```bash
$ grep sztp /etc/dhcp/dhcpd.conf
option sztp-redirect-urls code 143 = text;
option sztp-redirect-urls "https://bootstrap:8080/restconf/operations/ietf-sztp-bootstrap-server:get-bootstrapping-data";
```

Extract certificates from Bootstrap server:
Generate keys, certificates and server configuration file from template:

```bash
pushd sztp
bash ./generate.sh
popd
```

Start Bootstrap and Web servers from [compose](./docker-compose.yml):

```bash
docker compose cp bootstrap:/opi.pem /tmp/opi.pem
docker compose cp bootstrap:/tmp/sztpd-simulator/pki/client/end-entity/my_cert.pem /tmp/opi_cert.pem
docker compose cp bootstrap:/tmp/sztpd-simulator/pki/client/end-entity/private_key.pem /tmp/opi_private_key.pem
docker compose up -d bootstrap
```

Copy extracted certificates to DPUs:
Copy extracted keys and certificates to DPUs:

```bash
scp /tmp/opi*.pem [email protected]:/mnt/
scp ./generated-client/opi*.pem [email protected]:/mnt/
```

## Run on DPUs
Expand Down

0 comments on commit d99c9aa

Please sign in to comment.