-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
system install using arkade #261
system install using arkade #261
Conversation
$SUDO systemctl unmask containerd || : | ||
$SUDO curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v${CONTAINERD_VER}/containerd.service --output /etc/systemd/system/containerd.service | ||
$SUDO systemctl enable containerd | ||
$SUDO systemctl start containerd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I think we'll also want to keep the start command which arkade doesn't do at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No We don't need that. In local test on multipass containerd start after installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please just add the --systemd
flag to make it explicit then when people come back to do a diff later if there's ever a problem, it will help understand the change.
Why don't we add faasd to arkade, so that the get.sh script could use arkade to download that too? |
For testing, could you launch a new multipass VM, and then after it's up - use this script, followed by trying faas-cli login / store deploy and invoke etc. |
235c3f0
to
5ca4595
Compare
I had done that but forgot to add steps into PR. Added them now. |
|
hack/install.sh
Outdated
@@ -194,7 +161,8 @@ EOF | |||
} | |||
|
|||
install_faas_cli() { | |||
curl -sLS https://cli.openfaas.com | $SUDO sh | |||
arkade get faas-cli | |||
$SUDO mv $HOME/.arkade/bin/faas-cli /usr/local/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you will also need to chmod every binary so that the world can read and execute.
chmod o+rx /usr/local/bin/faas-cli
# or
chmod 755 /usr/local/bin/faas-cli
The install
command can also do this in one line:
$SUDO install -m 755 $HOME/.arkade/bin/faas-cli /usr/local/bin/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good, but I'd like us to get Caddy into arkade before we merge it.
Can you take that?
We also need to chmod executable files so regular users can execute them, so I suggested using the install command
@welteki thanks for running through that for us. What permission do you see for? |
@nitishkumar71 caddy is now available in arkade, if you're able to update the script? |
7576baa
to
00d9d1e
Compare
Ahh! I was working to setup it as system install, which is quite tricky. I have updated the code to use |
hack/install.sh
Outdated
curl -sSL "https://github.com/caddyserver/caddy/releases/download/v2.4.3/caddy_2.4.3_linux_${suffix}.tar.gz" | $SUDO tar -xvz -C /usr/bin/ caddy | ||
CADDY_VER=v2.4.3 | ||
arkade get caddy -v ${CADDY_VER} | ||
$SUDO install -m 755 $HOME/.arkade/bin/faas-cli /usr/local/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You install the faas-cli instead of caddy.
The systemd file expects caddy to be in /usr/bin
not /usr/local/bin/
$SUDO install -m 755 $HOME/.arkade/bin/faas-cli /usr/local/bin/ | |
$SUDO install -m 755 $HOME/.arkade/bin/caddy /usr/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, possibly missed to save. As i have tested the script code into multipass installation. Have corrected it.
Tested successfully on:
On CentOS 9 I run into an issue similar to alexellis/arkade#683, alexellis/arkade#685. When running arkade commands with sudo the arkade binary is not found because |
00d9d1e
to
86ec744
Compare
Signed-off-by: Nitishkumar Singh <[email protected]> install faas-cli using arkade Signed-off-by: Nitishkumar Singh <[email protected]> caddy installation moved to arkade Signed-off-by: Nitishkumar Singh <[email protected]> corrected caddy cli name Signed-off-by: Nitishkumar Singh <[email protected]>
86ec744
to
4a1c60a
Compare
From @welteki sounds like we may need a slight change for CentOS users because I suggested trying out this in the script: export PATH=$PATH:/usr/local/bin/
$SUDO -e arkade .. Otherwise? export ARKADE=/usr/local/bin/arkade
$SUDO -e $ARKADE install See also: alexellis/arkade@613830d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge this, @welteki is going to send a PR following on from this with changes for CentOS.
Signed-off-by: Nitishkumar Singh [email protected]
Arkade will be used to install system packages cni and containerd
Description
Motivation and Context
Closes Convert hack/install.sh to use arkade for system packages #259
How Has This Been Tested?
./hack/install.sh
is being used to do a complete installation of faasd.faas-cli namespaces
which will produce outputfaas-cli store deploy figlet
uname | faas-cli invoke figlet
. Output printed successfully.Types of changes
Checklist:
Commits:
git commit -s
for the Developer Certificate of Origin (DCO)Code:
Docs: