Prerequisites
Config.yaml (~/.konduktor/config.yaml
)
allowed_clouds:
- {s3, gs}
Setup
- Set up a GitHub SSH key here.
- For this example, the generated private key will be in
test_ssh_key
- Set up cloud storage credentials
- Check cloud storage setup with:
$ konduktor check {gs, s3}
For more details, check out the setup of cloud storage here.
Current Working Directory
$ ls
task.yaml test_ssh_key
$ cat test_ssh_key
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS
1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQR9WZPeBSvixkhjQOh9yCXXlEx5CN9M
yh94CJJ1rigf8693gc90HmahIR5oMGHwlqMoS7kKrRw+4KpxqsF7LGvxAAAAqJZtgRuWbY
EbAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH1Zk94FK+LGSGNA
6H3IJdeUTHkI30zKH3gIknWuKB/zr3eBz3QeZqEhHmgwYfCWoyhLuQqtHD7gqnGqwXssa/
EAAAAgBzKpRmMyXZ4jnSt3ARz0ul6R79AXAr5gQqDAmoFeEKwAAAAOYWpAYm93aWUubG9j
YWwBAg==
-----END OPENSSH PRIVATE KEY-----
Launching
$ konduktor launch task.yaml
Task.yaml
name: private-repo-ssh
resources:
cpus: 1
memory: 1
image_id: ubuntu
labels:
kueue.x-k8s.io/queue-name: user-queue
maxRunDurationSeconds: "600"
file_mounts:
~/.ssh/test-ssh-key: test_ssh_key
run: |
apt-get update && apt-get install -y git openssh-client
if [[ -f ~/.ssh/test-ssh-key && -s ~/.ssh/test-ssh-key ]]; then
echo "SSH key mounted and non-empty"
else
echo "SSH key missing or empty"
exit 1
fi
chmod 600 ~/.ssh/test-ssh-key
echo -e "Host github.com\n\tIdentityFile ~/.ssh/test-ssh-key\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
git clone git@github.com:<user-name>/<app-name>.git