An integration in a Git repository
GitOps 1 · 4:20
The hello integration and its devtest documents move into a Git repository, and Weik.io is updated from there after a plan shows what the update will change. The repository contains no secret values.
This part of the video couldn't be loaded.
What it covers
- Turning the work folder into a Git repository with
git init - The shared path
sandbox/sharedand the devtest pathsandbox/devtest - Deployment and variable documents for devtest, with no secret value in the repository
- A plan with
weikio diffthat applies nothing, with the prune namesandboxand its exit codes - Applying from the repository with
weikio apply, which builds 0.2.0 - A second commit with a new period and 0.2.1 in the integration and its deployment document
Commands in this video
Terminal
$ git init
$ weikio validate -f sandbox/shared -f sandbox/devtest
$ weikio diff -f sandbox/shared -f sandbox/devtest --env devtest --prune sandbox
$ echo $?
$ weikio apply -f sandbox/shared -f sandbox/devtest --env devtest --prune sandbox -y
$ git add sandbox
$ git commit -m 'hello in the repository'
$ git commit -m 'period 2000 and version 0.2.1'
$ git log --onelineTranscript
- 0:01hello started with commands. A Git repository now states what runs in your Weik.io installation.
- 0:12The earlier videos left hello here: agent dev runs its devtest deployment at 0.1.4,
- 0:20with the variable message and the secret erp-api-key.
- 0:27The hello folder on your machine records none of that.
- 0:34git init makes the work folder a Git repository.
- 0:38Everything Git records about the repository lives in its .git folder.
- 0:43The repository is on branch main.
- 0:45hello now lives under sandbox/shared/hello,
- 0:50the folder every environment of the project sandbox reads.
- 0:54The integration.yaml file states the version, here 0.2.0.
- 1:03Two devtest documents live under sandbox/devtest.
- 1:07The Deployment document states what runs where: hello at 0.2.0,
- 1:13started, in devtest of the project sandbox.
- 1:16The Variable document gives message its devtest value.
- 1:20No secret value is in the repository,
- 1:23and the route names its secret through a placeholder.
- 1:26weikio validate checks the two paths before anything is built,
- 1:30so mistakes are found early.
- 1:32Its last line counts what it checked and finds nothing to fix.
- 1:41weikio diff shows the plan for both paths, in devtest, under the prune name sandbox.
- 1:47It prints a row each for the integration, the deployment and the variable.
- 1:52The notes say these paths were never applied under that name, so nothing is deleted.
- 1:57Exit code 0 means the plan would change nothing, 2 means it would.
- 2:06weikio apply makes every change the plan previewed,
- 2:10with the prune confirmation already answered.
- 2:13The installation builds 0.2.0 from the repository's files.
- 2:21The Deployment document moves devtest to 0.2.0.
- 2:26The Weik.io CLI pushes each change into your Weik.io installation.
- 2:31git add sandbox stages the folder,
- 2:34then git commit records the change in the history.
- 2:41The timer now ticks every two seconds. integration.yaml states version 0.2.1.
- 2:50The Deployment document raises devtest to 0.2.1.
- 2:58The plan prints no first-time notes,
- 3:00because both paths were applied under that prune name before.
- 3:07The apply sends only what changed. Your installation builds 0.2.1,
- 3:13and devtest runs it.
- 3:17A pipeline would run these same commands, one per step.
- 3:21The commit message states both changes.
- 3:24The history on main holds both commits.
- 3:33The admin UI tells the same story on hello's page.
- 3:37devtest runs 0.2.1, and the list below keeps every built version,
- 3:43the running one marked.
- 3:49The repository states what runs, at which version, with which values.
- 3:54Every change reaches the installation as a validate, a plan and an apply.
- 4:00The installation builds each version once, then keeps it.
- 4:04The Deployment document names 0.2.1 as what devtest runs.
- 4:09Everything runs in an environment, here devtest.
Next in this track
GitOps 2 · 3:59 Deleting and undoing through Git Watched