Skip to content

Commit

Permalink
allow to build/push images into the leaf VM (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrichSchreiner committed Apr 29, 2024
1 parent 45eb9d6 commit a89c501
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,19 @@ ls: env

## SWITCH MANAGEMENT ##

.PHONY: ssh-leafconfig
ssh-leafconfig:
@grep "Host leaf01" ~/.ssh/config || echo -e "Host leaf01\n StrictHostKeyChecking no\n IdentityFile $(shell pwd)/files/ssh/id_rsa\n" >>~/.ssh/config
@grep "Host leaf02" ~/.ssh/config || echo -e "Host leaf02\n StrictHostKeyChecking no\n IdentityFile $(shell pwd)/files/ssh/id_rsa\n" >>~/.ssh/config

.PHONY: docker-leaf01
docker-leaf01:
@echo "export DOCKER_HOST=ssh://root@leaf01/var/run/docker.sock"

.PHONY: docker-leaf02
docker-leaf02:
@echo "export DOCKER_HOST=ssh://root@leaf02/var/run/docker.sock"

.PHONY: ssh-leaf01
ssh-leaf01:
ssh -o StrictHostKeyChecking=no -o "PubkeyAcceptedKeyTypes +ssh-rsa" -i files/ssh/id_rsa root@leaf01
Expand Down

0 comments on commit a89c501

Please sign in to comment.