Skip to content

Add instructions for initial deployment#23

Merged
dwilding merged 3 commits intomainfrom
more-readme
Apr 22, 2025
Merged

Add instructions for initial deployment#23
dwilding merged 3 commits intomainfrom
more-readme

Conversation

@dwilding
Copy link
Collaborator

This PR completes the "Deploy the dashboard on your machine" section of the README. My goal with this section is for the reader to be able to build the dashboard on their machine and see it working. It's not intended to fully simulate a production deployment - e.g., no ingress, as that's not required for the dashboard to run. I'm thinking that a later section can handle production concerns.


3. Modify the dashboard application so that it takes its configuration from environment variables and expects a PostgreSQL database instead of an SQLite database:

``` { name=modify-dashboard }
Copy link
Collaborator Author

@dwilding dwilding Apr 21, 2025

Choose a reason for hiding this comment

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

I'm using { name=foo } on command blocks that are to be run in the multipass VM (after cloning the repo). That's so that the runme tool can extract the command blocks, which makes it easier to use this README as the basis for demos.

juju run dashboard/0 load-sample-data
```

This uses a Juju "action" to run [manage.py](./dashboard/manage.py) inside the dashboard application's container. For technical details, see [TODO: doc in progress].
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll link to Erin's docs about adding custom actions, after that's published. See canonical/charmcraft#2256.


``` { name=deploy-dashboard }
cd ~/dashboard
rockcraft.skopeo --insecure-policy copy --dest-tls-verify=false \
Copy link
Collaborator Author

@dwilding dwilding Apr 21, 2025

Choose a reason for hiding this comment

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

I've put the rockcraft.skopeo step here for a couple of reasons:

  • I wanted to avoid the "Create a container image for the application" section having a long wait in the middle (from packing the rock).
  • Deploying the charm pulls the image from the registry, so it feels natural to introduce the registry close to where it's used.

@evildmp evildmp self-requested a review April 21, 2025 16:27
Copy link
Collaborator

@evildmp evildmp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@erinecon erinecon left a comment

Choose a reason for hiding this comment

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

README instructions look good to me!

Comment on lines +27 to 30
```
cd
git clone https://github.com/canonical/dashboard.git
```

Choose a reason for hiding this comment

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

For my understanding: Why do you have to cd before you run git clone?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This switches to the home directory of the VM, so that we can assume the cloned repo is at ~/dashboard later in the instructions.

Choose a reason for hiding this comment

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

Thanks for explaining!

Comment on lines +80 to +82
> ```
> Packed dashboard_0.7_amd64.rock
> ```

Choose a reason for hiding this comment

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

Nitpick: Will the user see this output, or (assuming they're running for the first time) Packed dashboard_0.1_amd64.rock?

I would either rephrase the line above to say When you return, you should see something similar to the following output:, or replace 0.7 with 0.1.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They should see this exact output with 0.7, because the version number in this repo's rockcraft.yaml is 0.7 (here)

Choose a reason for hiding this comment

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

Ah fair enough, I probably should have looked in the rockcraft.yaml file to confirm 😅 thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No worries 😁

@dwilding
Copy link
Collaborator Author

Merging - thanks a lot for the reviews!

@dwilding dwilding merged commit 0c81035 into main Apr 22, 2025
2 checks passed
@dwilding dwilding deleted the more-readme branch April 22, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants