-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add env variable to build from local packages
- Loading branch information
Showing
10 changed files
with
108 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LOCAL_AGENT_PACKAGE= | ||
LOCAL_CONTROLLER_PACKAGE= | ||
LOCAL_CONNECTOR_PACKAGE= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
# If local agent provided, install from local package, otherwise go to packagecloud | ||
if [ ! -z "$1" ] && [ ! "$1" = "./install.sh" ]; then | ||
echo "============> Installing local agent" | ||
dpkg -i /opt/iofog-agent/"$1" | ||
rm -f /opt/iofog-agent/"$1" | ||
else | ||
wget -q -O - https://packagecloud.io/install/repositories/iofog/iofog-agent/script.deb.sh | bash | ||
apt-get install iofog-agent | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
# If local connector provided, install from local package, otherwise go to packagecloud | ||
if [ ! -z "$1" ] && [ ! "$1" = "./install.sh" ]; then | ||
echo "============> Installing local connector" | ||
dpkg -i /opt/iofog-connector/"$1" | ||
rm -f /opt/iofog-connector/"$1" | ||
else | ||
wget -q -O - https://packagecloud.io/install/repositories/iofog/iofog-connector/script.deb.sh | bash | ||
apt-get install iofog-connector | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
FROM node:8.16.0-alpine | ||
|
||
ARG LOCAL_CONTROLLER_PACKAGE | ||
# Copy local package, or default install script (No conditional copy in docker) | ||
COPY ./install.sh ${LOCAL_CONTROLLER_PACKAGE}* /opt/iofog-controller/ | ||
|
||
# Install iofog-controller | ||
COPY ./install.sh ./install.sh | ||
RUN ./install.sh | ||
RUN rm ./install.sh | ||
RUN /opt/iofog-controller/install.sh ${LOCAL_CONTROLLER_PACKAGE} | ||
RUN rm /opt/iofog-controller/install.sh | ||
|
||
ENTRYPOINT [ "sh", "-c", "iofog-controller start && tail -f /dev/null" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
# If local controller provided, install from local package, otherwise go to npm repository | ||
if [ ! -z "$1" ] && [ ! "$1" = "./install.sh" ]; then | ||
echo "============> Installing local controller" | ||
npm install --unsafe-perm -g /opt/iofog-controller/"$1" | ||
rm -f /opt/iofog-controller/"$1" | ||
else | ||
npm i -g iofogcontroller --unsafe-perm | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters