Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trcotton/quickstart readme #66

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
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
27 changes: 13 additions & 14 deletions quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ This quickstart makes a few assumptions about the target operating system and is
grep LOCAL_IP .env
```
If you have problems with this step, check to make sure that the main IP address of your host is in `.env` as `LOCAL_IP`.

1. Update your /etc/hosts to point your system name to your local ip (this is important for valid certs)
1. Start the main services
```bash
docker compose -f base.yml -f postgres.yml -f jwt-security.yml -f haproxy-api-gateway.yml -f openchami-svcs.yml -f autocert.yml up -d

1. Use docker-compose to bring up the services. Docker compose needs to know about all the files to follow dependencies.
```bash
docker compose -f base.yml -f postgres.yml -f jwt-security.yml -f haproxy-api-gateway.yml -f openchami-svcs.yml -f autocert.yml -f dnsmasq.yml up -d
```
__If this step produces an error like: `Error response from daemon: invalid IP address in add-host: ""` it means you're missing the LOCAL_IP in step 2.__
You can fix it by destroying everything, editing `.env` manually and starting over. The command to destroy is the same as the command to create, just replace `up -d` with `down --volumes`

1. Use the running system to download your certs and create your access token(s)
```bash
# Assuming you're using bash as your shell, you can use the included functions to simplify interactions with your new OpenCHAMI system.
Expand All @@ -50,22 +52,19 @@ This quickstart makes a few assumptions about the target operating system and is
# Create a jwt access token for use with the apis.
ACCESS_TOKEN=$(gen_access_token)
# If you're curious about that token, you can safely copy and paste it into https://jwt.io to learn more.
# Use curl to confirm that everything is working
curl --cacert cacert.pem -H "Authorization: Bearer $ACCESS_TOKEN" https://foobar.openchami.cluster/hsm/v2/State/Components

1. Confirm services are up and running
Check you can access SMD. Component endpoint is unprotected
```bash
curl --cacert cacert.pem https://foobar.openchami.cluster:8443/hsm/v2/State/Components
# This should respond with an empty set of Components: {"Components":[]}
```
1. Create a token that can be used by the dnsmasq-loader which reads from smd. This activates our automatic dns/dhcp system. The command automatically adds it to .env
```bash
echo "DNSMASQ_ACCESS_TOKEN=$(gen_access_token)" >> .env
```
1. Use docker-compose to bring up your dnsmasq contianers. The only difference between this command and the one above is the addition of the `dnsmasq.yml` file. Docker compose needs to know about all the files to follow dependencies.
Check if you can read Redfish endpoints. This endpoint is protected
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe clarify here that since the endpoint is protected, a token is required. The user should make sure they have set the access token in the step above.

```bash
docker compose -f base.yml -f postgres.yml -f jwt-security.yml -f haproxy-api-gateway.yml -f openchami-svcs.yml -f autocert.yml -f dnsmasq.yml up -d
curl --cacert cacert.pem -H "Authorization: Bearer $ACCESS_TOKEN" https://foobar.openchami.cluster:8443/hsm/v2/Inventory/RedfishEndpoints
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we are sticking with port 8443 for now then. It might be worth pointing out that this is running on a non-standard port.

```




## What's next?

### Refresh your certificates
Expand Down