Open martinsotirov opened 3 years ago
I don't believe this is currently supported.
Bump. 2022. Anything change?
I would also love to see support for Docker Swarm management since i can not implement it myself :)
Bump. 2023. Anything change?
You can use @pulumi/command
to init + join a swarm.
For example:
export const initSwarm = new command.remote.Command("initSwarm", {
connection: {
host: managerInstance.ipAddress,
user: "root",
privateKey,
},
create: pulumi.interpolate`
docker swarm init --advertise-addr ${managerInstance.ipAddress}
docker swarm join-token worker -q
`,
});
const joinSwarmToken = initSwarm.stdout.apply(
(stdout) => stdout.split("\n").pop()?.trim() || ""
);
export const joinSwarm = new command.remote.Command("joinSwarm", {
connection: {
host: workerInstance.ipAddress,
user: "root",
privateKey,
},
create: pulumi.interpolate` docker swarm join --token ${joinSwarmToken} ${managerInstance.ipAddress}:2377 `,
});
Am I missing something or are there no utilities to init and join a swarm from this package?