Get up and running with Ocuroot in a few minutes!
deliver
commandsync
commandbuild
the package and to deploy
and destroy
the package in any given environment.
It also includes a policy
function that determines whether a build is ready to deploy in a specific environment.
Ocuroot will execute this function frequently to keep the target state updated and determine what deployments should happen next.
deliver
command, which will run builds for any packages that have been modified, and record those builds within Ocuroot’s state store so they can be deployed as desired.
message
and qr
packages, as neither of them has been built before.
The CLI will tell you what it’s doing at each step of the way.
If anything goes wrong, Ocuroot will output a full log to help you diagnose the problem.
You can see the results of the deliver
operation for message
in the UI:
message
attribute contains the output of the file message/message.txt.
This acts as the “asset” for this build that we can deploy to various environments.
If you go back to the package page for the message package, you can select the “Deployments” tab
to view a summary of which environments have received which deployment.
deliver
command, is the sync
command.
This command will check the target and actual deployment state of your packages and perform necessary actions to bring them in sync with one another.
If you run:
ocuroot sync
again. Then open the deployments view for the qr package.
You will see that qr has been deployed to staging, and in the UI, you will see an indicator showing it is “live” in that environment.
You will also see that the build is now ready to deploy to production.
ocuroot sync
, you can run it in continuous mode:
ocuroot deliver
and ocuroot sync
would run on your CI platform. Ocuroot provides hooks and helpers to help manage this integration.ocuroot deliver
.
You will see that only message
was built and deployed.
This is because the file you changed was only in the scope covered by message/package.ocu.star.
The package file will monitor any files in or below its own directory.
Once the build has completed, run ocuroot sync --continuous
to deploy through to the production environments.
You will see that the initial build of qr
is redeployed.
This is because the input it pulled from the message
package has been updated, so qr
has to be redeployed to pick up the new value.
Double-check the generated QR codes to make sure they’re displaying the correct message. They should all show your new message and specify the correct environment.
Congratulations, you’ve deployed your first changes with Ocuroot!