Skip to main content

2. Deploy the Integration

An integration runs in an environment. Deploying means: build an image from your route, then start it there.

Environment binding​

Open orders-api. Choose Bind to environment and pick the environment, dev for example.

An integration can be bound to several environments. Each one is deployed separately, which is how the same integration goes from development to production.

Build and rollout​

With the environment selected, choose Apply changes.

Two things then happen, the first time:

  1. Build: the platform turns your route into a container image: it resolves the dependencies with Maven, compiles, and publishes the image to the registry of the environment. This takes a few minutes the first time.
  2. Run: the image is started. The integration is ready when its route has started.

The overview of the integration follows both. The build has a log of its own: when a build fails, that is where the reason is, most often a dependency that cannot be found, or a route that does not parse.

Later deployments are faster

A change that does not touch the route or its dependencies (a property, a variable, more memory) does not rebuild the image. The integration only restarts.

Integration phases and readiness​

The page of the integration shows where the deployment stands. "Running" and "ready" are two different things: the process can be up while its routes have not started.

What you seeWhat it means
Build in progressThe image is being made
Running, readyThe route started and answers
Running, not readyThe process started but the route did not: read the logs
ErrorThe build failed, or the integration stops as soon as it starts
Why "ready" matters

The gateway and other workloads only send traffic to instances that are ready. An integration that is running but not ready receives nothing, which looks like an outage from outside.

Call the in-cluster service​

The integration has no public address yet. To check it from inside the environment, call its service by name, which is the name of the integration:

From inside the environment
curl http://orders-api/orders
Answer
{"service":"orders","status":"ok"}

Logs and instance state​

The page of the integration gives its instances and their state. For the rest, open Monitoring:

You wantLook at
What the route loggedLogs Insight
How many requests, how fast, how many failedMetrics
Where the time of one request wentDistributed Traces

Nothing has to be added to the route for this: it comes from the monitoring dependencies that every integration carries.

Redeploy after a source change​

Edit the source of the integration, then Apply changes again. Each deployment is kept as a revision: you can see what was deployed and when, and go back to an earlier one.

A rollback restores source and settings together

A revision records the whole integration. Rolling back also returns the settings to what they were, including a property you had corrected since.

Undeploy the Integration​

Undeploy removes the integration from the selected environment and keeps its definition. Delete removes the integration itself.

Next: externalize the configuration.