blob: acc96c978fb469294f28c0595827e1031d7fbda6 [file] [log] [blame]
DTabidze52593392024-03-08 12:53:20 +04001repo_name ?= dtabidze
2podman ?= docker
3
Giorgi Lekveishvili0ccd1482023-06-21 15:02:24 +04004clean:
5 rm -rf tmp
6 rm -f server_*
7 rm -f pcloud
giolekva716efb92022-05-07 23:08:58 +04008
Giorgi Lekveishvili0ccd1482023-06-21 15:02:24 +04009push_fluxcd_arm64:
DTabidze52593392024-03-08 12:53:20 +040010 $(podman) build --file=Dockerfile.flux --tag=$(repo_name)/flux:latest . --platform=linux/arm64
11 docker push $(repo_name)/flux:latest
giolekva9eacb1a2022-05-21 13:57:19 +040012
Giorgi Lekveishvilia1e77902023-11-06 14:48:27 +040013build: export CGO_ENABLED=0
Giorgi Lekveishvili0ccd1482023-06-21 15:02:24 +040014build: clean
Giorgi Lekveishvili46743d42023-12-10 15:47:23 +040015 /usr/local/go/bin/go build -o pcloud cmd/*.go
16
17test: export CGO_ENABLED=0
18test:
Giorgi Lekveishvili186eae52024-02-15 14:21:41 +040019 /usr/local/go/bin/go test ./...
giolekva9eacb1a2022-05-21 13:57:19 +040020
21bootstrap:
Giorgi Lekveishvilia1e77902023-11-06 14:48:27 +040022 ./pcloud --kubeconfig=../../priv/kubeconfig-hetzner bootstrap --env-name=dodo --charts-dir=../../charts --admin-pub-key=/Users/lekva/.ssh/id_rsa.pub --from-ip=192.168.100.210 --to-ip=192.168.100.240 --storage-dir=/pcloud-storage/longhorn
giolekva8aa73e82022-07-09 11:34:39 +040023
24create_env:
Giorgi Lekveishvili7fb28bf2023-06-24 19:51:16 +040025 ./pcloud --kubeconfig=../../priv/kubeconfig create-env --admin-priv-key=/Users/lekva/.ssh/id_rsa --name=lekva --ip=192.168.0.211 --admin-username=gio
giolekva8aa73e82022-07-09 11:34:39 +040026
Giorgi Lekveishvili23ef7f82023-05-26 11:57:48 +040027rpuppy:
Giorgi Lekveishvili7fb28bf2023-06-24 19:51:16 +040028 ./pcloud --kubeconfig=../../priv/kubeconfig install --ssh-key=/Users/lekva/.ssh/id_rsa --app=rpuppy --repo-addr=ssh://localhost:2222/lekva
Giorgi Lekveishvili7efe22f2023-05-30 13:01:53 +040029
30appmanager:
Giorgi Lekveishvilief21c132024-01-17 18:57:58 +040031 ./pcloud --kubeconfig=../../priv/kubeconfig appmanager --ssh-key=/Users/lekva/.ssh/id_ed25519 --repo-addr=ssh://localhost:2222/config --port=9090 --app-repo-addr=http://localhost:8080
Giorgi Lekveishvili0ccd1482023-06-21 15:02:24 +040032
Giorgi Lekveishvili12850ee2023-06-22 13:11:17 +040033welc:
Giorgi Lekveishvili46743d42023-12-10 15:47:23 +040034 ./pcloud --kubeconfig=../../priv/kubeconfig welcome --ssh-key=/Users/lekva/.ssh/id_rsa --repo-addr=ssh://192.168.0.210/config --port=9090
35
36env:
37 ./pcloud --kubeconfig=../../priv/kubeconfig-hetzner envmanager --ssh-key=/Users/lekva/.ssh/id_rsa --repo-addr=192.168.100.210:22 --repo-name=config --port=9090
Giorgi Lekveishvili12850ee2023-06-22 13:11:17 +040038
Giorgi Lekveishvili0ccd1482023-06-21 15:02:24 +040039
40
41
42## installer image
43build_arm64: export CGO_ENABLED=0
44build_arm64: export GO111MODULE=on
45build_arm64: export GOOS=linux
46build_arm64: export GOARCH=arm64
47build_arm64:
Giorgi Lekveishvili46743d42023-12-10 15:47:23 +040048 /usr/local/go/bin/go build -o server_arm64 cmd/*.go
Giorgi Lekveishvili0ccd1482023-06-21 15:02:24 +040049
Giorgi Lekveishvili94cda9d2023-07-20 10:16:09 +040050build_amd64: export CGO_ENABLED=0
51build_amd64: export GO111MODULE=on
52build_amd64: export GOOS=linux
53build_amd64: export GOARCH=amd64
54build_amd64:
Giorgi Lekveishvili46743d42023-12-10 15:47:23 +040055 /usr/local/go/bin/go build -o server_amd64 cmd/*.go
Giorgi Lekveishvili94cda9d2023-07-20 10:16:09 +040056
57push_arm64: clean build_arm64
Giorgi Lekveishvili0ccd1482023-06-21 15:02:24 +040058 mkdir tmp
59 cp -r ../../charts tmp/
DTabidze52593392024-03-08 12:53:20 +040060 $(podman) build --platform linux/arm64 --tag=$(repo_name)/pcloud-installer:arm64 .
Giorgi Lekveishvili0ccd1482023-06-21 15:02:24 +040061 rm -rf tmp
DTabidze52593392024-03-08 12:53:20 +040062 $(podman) push $(repo_name)/pcloud-installer:arm64
Giorgi Lekveishvili94cda9d2023-07-20 10:16:09 +040063
64push_amd64: clean build_amd64
65 mkdir tmp
66 cp -r ../../charts tmp/
DTabidze52593392024-03-08 12:53:20 +040067 $(podman) build --platform linux/amd64 --tag=$(repo_name)/pcloud-installer:amd64 .
Giorgi Lekveishvili94cda9d2023-07-20 10:16:09 +040068 rm -rf tmp
DTabidze52593392024-03-08 12:53:20 +040069 $(podman) push $(repo_name)/pcloud-installer:amd64
Giorgi Lekveishvili94cda9d2023-07-20 10:16:09 +040070
71push: push_arm64 push_amd64
DTabidze52593392024-03-08 12:53:20 +040072 $(podman) manifest create $(repo_name)/pcloud-installer:latest $(repo_name)/pcloud-installer:arm64 $(repo_name)/pcloud-installer:amd64
73 $(podman) manifest push $(repo_name)/pcloud-installer:latest
74 $(podman) manifest rm $(repo_name)/pcloud-installer:latest