Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container replication for Pulsar #153

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions core/src/main/scala/workflows/Pulsar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ package nelson
import cats.syntax.apply._

import nelson.Datacenter.{Deployment, Namespace => DCNamespace}
import nelson.DeploymentStatus.{Pending, Ready, Terminated, Warming}
import nelson.DeploymentStatus.{Pending, Deploying, Ready, Terminated, Warming}
import nelson.Manifest.{Namespace => ManifestNamespace, Plan, UnitDef, Versioned}
import nelson.Workflow.{WorkflowF, WorkflowOp}
import nelson.Workflow.WorkflowF
import nelson.Workflow.syntax._
import nelson.docker.DockerOp

/**
* Kubernetes deployment workflow that deploys and deletes units, whilst provisioning
Expand All @@ -46,8 +45,9 @@ object Pulsar extends Workflow[Unit] {
else unit.ports.fold[DeploymentStatus](Ready)(_ => Warming)

for {
i <- DockerOp.extract(Versioned.unwrap(vunit)).inject[WorkflowOp]
_ <- status(id, Pending, "Pulsar workflow about to start")
_ <- status(id, Deploying, "Replicating container images to remote registry")
i <- dockerOps(id, unit, dc.docker.registry)
//// write the policies to Vault
_ <- logToFile(id, s"Writing policy to vault: ${vaultLoggingFields(sn, ns = ns.name, dcName = dc.name)}")
_ <- writePolicyToVault(cfg = dc.policy, sn = sn, ns = ns.name, rs = rs)
Expand Down