Skip to content

Commit

Permalink
Run faasd from /usr/local/bin
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Dec 28, 2019
1 parent 4ba3ec3 commit 6230d35
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ func runInstall(_ *cobra.Command, _ []string) error {
return err
}

err := binExists("/usr/local/bin/", "faasd")
if err != nil {
return err
}

err = binExists("/usr/local/bin/", "netns")
if err != nil {
return err
Expand Down
28 changes: 28 additions & 0 deletions hack/build-containerd-armhf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

echo "Downloading Go"

curl -SLsf https://dl.google.com/go/go1.12.14.linux-armv6l.tar.gz > go.tgz
sudo rm -rf /usr/local/go/
sudo mkdir -p /usr/local/go/
sudo tar -xvf go.tgz -C /usr/local/go/ --strip-components=1

export GOPATH=$HOME/go/
export PATH=$PATH:/usr/local/go/bin/

go version

echo "Building containerd"

mkdir -p $GOPATH/src/github.com/containerd
cd $GOPATH/src/github.com/containerd
git clone https://github.com/containerd/containerd

cd containerd
git fetch origin --tags
git checkout v1.3.2

make
sudo make install

sudo containerd --version
28 changes: 28 additions & 0 deletions hack/build-containerd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

echo "Downloading Go"

curl -SLsf https://dl.google.com/go/go1.12.14.linux-amd64.tar.gz > go.tgz
sudo rm -rf /usr/local/go/
sudo mkdir -p /usr/local/go/
sudo tar -xvf go.tgz -C /usr/local/go/ --strip-components=1

export GOPATH=$HOME/go/
export PATH=$PATH:/usr/local/go/bin/

go version

echo "Building containerd"

mkdir -p $GOPATH/src/github.com/containerd
cd $GOPATH/src/github.com/containerd
git clone https://github.com/containerd/containerd

cd containerd
git fetch origin --tags
git checkout v1.3.2

make
sudo make install

sudo containerd --version
2 changes: 1 addition & 1 deletion hack/faasd.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=faas-containerd.service

[Service]
MemoryLimit=500M
ExecStart={{.Cwd}}/faasd up
ExecStart=/usr/local/bin/faasd up
Restart=on-failure
RestartSec=10s
WorkingDirectory={{.Cwd}}
Expand Down

0 comments on commit 6230d35

Please sign in to comment.