Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ This template comes preconfigured for Continuous Integration and Continuous Deli

Upon merging changes in to the `main` branch, your application will be built and packaged into a container. The default deployment behavior is controlled by [`IMAGE_VARIANT`](.github/workflows/ci-cd.yaml:20) in [`.github/workflows/ci-cd.yaml`](.github/workflows/ci-cd.yaml). It is currently set to `gui-xpra`, which builds the browser-served GUI variant by default. If your application is intended as a headless service, or works better from the command line, change [`IMAGE_VARIANT`](.github/workflows/ci-cd.yaml:20) to `cli`.

Once the container is built, it will be pushed into Harbor at `adregistry.fnal.gov` so it can be deployed into the Kubernetes environment. Before images can be pushed to Harbor, a GitHub fermi-ad admin must add the appropriate GitHub App containing the AP Python Harbor secrets to your repository. Reach out to beau@fnal.gov or mariana@fnal.gov for this before you attempt to deploy.
Once the container is built, it will be pushed into Harbor at `adregistry.fnal.gov` so it can be deployed into the Kubernetes environment. Before images can be pushed to Harbor, **a GitHub fermi-ad admin must add the appropriate GitHub App containing the AP Python Harbor secrets to your repository**. Reach out to beau@fnal.gov or mariana@fnal.gov for this before you attempt to deploy.

After successful deployment, navigate to the [AP Python Launcher](https://ad-apps-internal.fnal.gov/ap-python/) to launch your app!

To reiterate: **deployment will happen on every commit to the `main` branch.** If you do not want a new container being generated every time you make a change (e.g., if you're in the middle of implementing a new feature and want to do it in stages), the recommended approach is to create a "feature" branch that tracks your pending updates. Starting on `main`, the process would look something like this:

Expand All @@ -106,4 +108,4 @@ To reiterate: **deployment will happen on every commit to the `main` branch.** I
7. Repeat steps 2-6 until your feature branch has all the changes you want to make and is ready to be deployed
8. Open a pull request from your feature branch into `main` -> Runs the automated integration workflow one last time on all your changes together
9. Merge into `main` -> Constructs the new container for your application and delivers it to Harbor
- Congrats! Your changes are now ready to be deployed.
- Congrats! Your changes are now deployed to the [AP Python Launcher](https://ad-apps-internal.fnal.gov/ap-python/)!
21 changes: 10 additions & 11 deletions docs/devpod.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The workspace uses the external image referenced there, which is expected to pro
3. On your local machine, [install DevPod](https://devpod.sh/docs/getting-started/install#install-devpod).
4. Open DevPod and enter the URL of your project's GitHub repository, or point it to the local directory if you've already cloned the repo.
5. Select Docker as the "Provider"
- If on Windows, edit the advanced options to specify the "Host" as `tcp://127.0.0.1:2375`.
- If on Windows, edit the advanced options to specify the "Host" as `tcp://127.0.0.1:2375` and change "Docker Path" to "podman".
6. Select VS Code as your IDE
7. Click Create - the dev container will be pulled down and started for you, and VS Code should open
8. After the workspace starts, open a terminal in VS Code and run
Expand Down Expand Up @@ -72,22 +72,21 @@ This guide uses **Podman** and exposes a **Docker-compatible API endpoint** to D

1. Run the following in a terminal with administrator rights (you may be asked to restart your machine)
```PowerShell
wsl --install
wsl --install -d Ubuntu
```
Ubuntu will be the default Linux distribution, and the remainder of this guide will target that.
2. Install Podman Desktop on Windows:
- Download and install Podman Desktop: <https://podman-desktop.io/downloads/windows>
- Open Podman Desktop after installing so it can finish first-time setup. It will walk you through creating a Podman Machine. Be sure to select the WSL2 integration during this step.
3. Open the Start menu and type `wsl`. Run the WSL application.
4. You will be asked to set up a username and password in the Ubuntu instance. This has no bearing on your Windows environment. The user you set up will have administrator (sudo) permissions in the Ubuntu image.
5. Update the packages installed by running
2. Open the Start menu and type `wsl`. Run the WSL application.
3. You will be asked to set up a username and password in the Ubuntu instance. This has no bearing on your Windows environment. The user you set up will have administrator (sudo) permissions in the Ubuntu image.
4. Update the packages installed by running
```bash
sudo apt update && sudo apt upgrade
```

##### Install Podman (in WSL Ubuntu)
##### Install Podman

6. Install Podman from Ubuntu's repositories:
5. Install Podman Desktop on Windows:
- Download and install Podman Desktop: <https://podman-desktop.io/downloads/windows>
- Open Podman Desktop after installing so it can finish first-time setup. It will walk you through creating a Podman Machine. Be sure to select the WSL2 integration during this step.
6. Install Podman on your WSL instance from Ubuntu's repositories:
```bash
sudo apt install -y podman
```
Expand Down