Skip to content

Commit

Permalink
fix(orchestrator): [k8s] use custom image for init container (#1667)
Browse files Browse the repository at this point in the history
* fix(orchestrator): [k8s] use custom image for init container

* lint

* trim lines in README
  • Loading branch information
pepoviola authored Jan 10, 2024
1 parent c3a96c9 commit 9c95c5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
14 changes: 7 additions & 7 deletions javascript/packages/orchestrator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Zombienet releases are available in `github`. Each one provides an executable fo
*without* having `Node.js` installed **but** each `provider` defines it's own requirements (e.g.
`k8s`, `podman`).

**Note:** Currently, it is only possible to use `podman` for Zombienet users on Linux machines.
**Note:** Currently, it is only possible to use `podman` for Zombienet users on Linux machines.
Although `podman` comes with support for macOS, it is done using an internal VM and the Zombienet provider code expects `podman` to be running natively.

## Status
Expand Down Expand Up @@ -62,7 +62,7 @@ Zombienet project has it's own `k8s` cluster in GCP, to use it please ping
Zombienet support [Podman](https://podman.io/) *rootless* as provider, you only need to have
`podman` installed in your environment to use and either set in the *network* file or with the
`--provider` flag in the cli. `Podman` for `zombienet` is currently only supported for Linux machines.
This is mostly related to paths and directories used by
This is mostly related to paths and directories used by
store configuration (chain-spec) and the data directory.

### With Native
Expand Down Expand Up @@ -199,7 +199,7 @@ message with the `node`s information like this one is shown
├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Prometheus Link │ http://127.0.0.1:44107/metrics │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/alice.log │
│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/alice.log │
├─────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Node Information │
├─────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤
Expand All @@ -209,7 +209,7 @@ message with the `node`s information like this one is shown
├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Prometheus Link │ http://127.0.0.1:43831/metrics │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/bob.log │
│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/bob.log │
├─────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Node Information │
├─────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┤
Expand All @@ -219,7 +219,7 @@ message with the `node`s information like this one is shown
├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Prometheus Link │ http://127.0.0.1:38281/metrics │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/collator01.log │
│ Log Cmd │ tail -f /tmp/zombie-85391d4649f2829bb26b30d6c0328bcb_-15819-BNFoSs5qusWH/collator01.log │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Parachain ID │ 100 │
└─────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘
Expand Down Expand Up @@ -362,7 +362,7 @@ For example:

> Note: If you are using macOS please clone the [polkadot-sdk repo](https://github.com/paritytech/polkadot-sdk) and run it locally. At the moment there is no `polkadot` binary for MacOs.
The command above will retrieve the binaries provided and try to download and prepare those binaries for usage.
The command above will retrieve the binaries provided and try to download and prepare those binaries for usage.
At the end of the download, the `setup` script will provide a command to run in your local environment in order to add the directory where the binaries were downloaded in your $PATH var, for example:

```bash
Expand Down Expand Up @@ -395,7 +395,7 @@ Options:
-c, --spawn-concurrency <concurrency> Number of concurrent spawning process to launch, default is 1
-p, --provider <provider> Override provider to use (choices: "podman", "kubernetes", "native")
-l, --logType <logType> Type of logging - defaults to 'table' (choices: "table", "text", "silent")
-d, --dir <path> Directory path for placing the network files instead of random temp one
-d, --dir <path> Directory path for placing the network files instead of random temp one
(e.g. -d /home/user/my-zombienet)
-f, --force Force override all prompt commands
-h, --help display help for command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export class NodeResource {
return [
{
name: TRANSFER_CONTAINER_NAME,
image: "docker.io/alpine",
image:
"europe-west3-docker.pkg.dev/parity-zombienet/zombienet-public-images/alpine:latest",
imagePullPolicy: "Always",
volumeMounts: [
{ name: "tmp-cfg", mountPath: "/cfg", readOnly: false },
Expand All @@ -84,17 +85,10 @@ export class NodeResource {
"ash",
"-c",
[
"wget github.com/moparisthebest/static-curl/releases/download/v7.83.1/curl-amd64 -O /cfg/curl",
"echo downloaded",
"cp /tmp/curl /cfg/curl",
"chmod +x /cfg/curl",
"echo chmoded",
"wget github.com/uutils/coreutils/releases/download/0.0.17/coreutils-0.0.17-x86_64-unknown-linux-musl.tar.gz -O /cfg/coreutils-0.0.17-x86_64-unknown-linux-musl.tar.gz",
"cd /cfg",
"tar -xvzf ./coreutils-0.0.17-x86_64-unknown-linux-musl.tar.gz",
"cp ./coreutils-0.0.17-x86_64-unknown-linux-musl/coreutils /cfg/coreutils",
"cp /tmp/coreutils /cfg/coreutils",
"chmod +x /cfg/coreutils",
"rm -rf ./coreutils-0.0.17-x86_64-unknown-linux-musl",
"echo coreutils downloaded",
`until [ -f ${FINISH_MAGIC_FILE} ]; do echo ${TRANSFER_CONTAINER_WAIT_LOG}; sleep 1; done; echo copy files has finished`,
].join(" && "),
],
Expand Down

0 comments on commit 9c95c5e

Please sign in to comment.