From e8f963b30004069810b80dd89c8a1441cf2ff90a Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 15 Sep 2023 11:57:25 +0900 Subject: [PATCH] Move init-host out of the `hack` directory Signed-off-by: Akihiro Suda --- README.md | 2 ++ hack/README.md | 1 + hack/create-cluster-lxd.sh | 4 ++-- init-host/README.md | 7 +++++++ {hack => init-host}/init-host.root.sh | 0 {hack => init-host}/init-host.rootless.sh | 0 6 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 hack/README.md create mode 100644 init-host/README.md rename {hack => init-host}/init-host.root.sh (100%) rename {hack => init-host}/init-host.rootless.sh (100%) diff --git a/README.md b/README.md index 87327ab..be13bf5 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,8 @@ EOF sudo sysctl --system ``` +Use scripts in [`./init-host`](./init-host) for automating these steps. + ## Usage See `make help`. diff --git a/hack/README.md b/hack/README.md new file mode 100644 index 0000000..507d50f --- /dev/null +++ b/hack/README.md @@ -0,0 +1 @@ +This directory contains testing utilities. diff --git a/hack/create-cluster-lxd.sh b/hack/create-cluster-lxd.sh index 3ef2b63..ceecb82 100755 --- a/hack/create-cluster-lxd.sh +++ b/hack/create-cluster-lxd.sh @@ -7,9 +7,9 @@ SCP="scp -F ${HOME}/.u7s-ci-hosts/ssh_config" SSH="ssh -F ${HOME}/.u7s-ci-hosts/ssh_config" for host in host0 host1; do $SCP -r "$(pwd)" "${host}:~/usernetes" - $SSH "${USER}-sudo@${host}" sudo "~${USER}/usernetes/hack/init-host.root.sh" + $SSH "${USER}-sudo@${host}" sudo "~${USER}/usernetes/init-host/init-host.root.sh" $SSH "${USER}-sudo@${host}" sudo loginctl enable-linger "${USER}" - $SSH "${host}" ~/usernetes/hack/init-host.rootless.sh + $SSH "${host}" ~/usernetes/init-host/init-host.rootless.sh done # Launch a Kubernetes node inside a Rootless Docker host diff --git a/init-host/README.md b/init-host/README.md new file mode 100644 index 0000000..4a1203b --- /dev/null +++ b/init-host/README.md @@ -0,0 +1,7 @@ +This directory contains scripts for initializing host operating systems. + +Usage: +```bash +sudo ./init-host.root.sh +./init-host.rootless.sh +``` diff --git a/hack/init-host.root.sh b/init-host/init-host.root.sh similarity index 100% rename from hack/init-host.root.sh rename to init-host/init-host.root.sh diff --git a/hack/init-host.rootless.sh b/init-host/init-host.rootless.sh similarity index 100% rename from hack/init-host.rootless.sh rename to init-host/init-host.rootless.sh