You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
version: v2builds:
website:
context: ./frontendbuckets:
bucket1:
directory: ./staticdescription: Static bucket to be filled with the contents of my local `./static` folderwebsite:
description: Bucket to be filled with the `dist` folder output by the build step belowdeploy:
image: ${{ builds.website.image }}command: npm run buildpublish: ./distenvironment:
# Static websites can only connect to ingress rulesAPI_ADDR: ${{ ingresses.api.url }}AUTH_ADDR: ${{ dependencies.auth.ingresses.main.url }}# Static buckets can also define ingress rules for how traffic should be routed to themingresses:
website:
bucket: website
The text was updated successfully, but these errors were encountered:
Implementation of this is proving a bit more difficult than I thought, but I'm starting to get a handle on it. For my own sake, I'm going to jot down the different flows that matter and what I expect the graph steps to be for each.
Deploy from source
This would happen if you try to deploy a component from source that requires a build step. This is a common flow for static websites:
$ arcctl deploy ./architect.yml -e test
Below is an example of an architect.yml file that we'll be deploying:
version: v2# This docker image basically just # 1. installs node/npm, # 2. copies in the entire source code, and # 3. runs npm installbuilds:
website:
context: ./# We'll run a deploy hook right before we deploy the component (not when we build it)# so that environment variables get replaced correctly (e.g. just-in-time builds)buckets:
website:
deploy:
image: ${{ builds.website.image }}command: npm run buildpublish: ./buildenvironment:
SELF_ADDR: ${{ ingresses.website.url }}ingresses:
website:
bucket: website
When deployed from source, this would yield the following steps:
Turn builds into docker images
Create bucket
Create ingress
Create volume to store bucket contents in
Run task and put publish contents into the volume
Run task to migrate volume contents into bucket
Clean up volume
Deploy from built component
This is basically the same as the above, but without the build step since the docker image is already built.
$ arcctl deploy architectio/component:latest -e test
If we deploy the above, it would do the following. Step 2.b.ii isn't immediately intuitive, but the reason we have to use the same volume flows as the previous steps is because we have no guarantees that each step will run on the same host machine (e.g. CI systems with multiple workers or ephemeral hosts). The volume acts as a persistent store between steps, and also allows step 2.b.iii to be the same across all use-cases.
Create bucket
-- The following can be done in parallel --
a. Create ingress
b. Push contents to bucket
Create volume to put contents int
Package directory contents into container task that will fill the volume
Component schema
The text was updated successfully, but these errors were encountered: