Skip to content

Commit

Permalink
Merge pull request #36 from dappnode/v0.2.24
Browse files Browse the repository at this point in the history
v0.2.24 Release
  • Loading branch information
eduadiez authored Dec 26, 2019
2 parents f6d6c19 + b2ca448 commit 0b823bf
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 26 deletions.
28 changes: 15 additions & 13 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
wget \
"https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub" \
-O "/etc/apk/keys/sgerrand.rsa.pub" && \
"https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub" \
-O "/etc/apk/keys/sgerrand.rsa.pub" && \
wget \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
apk add --no-cache \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
\
rm "/etc/apk/keys/sgerrand.rsa.pub" && \
/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true && \
Expand All @@ -40,16 +40,18 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases
rm "/root/.wget-hsts" && \
apk del .build-dependencies && \
rm \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"

RUN wget https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-Linux-x86_64 -O /usr/local/bin/docker-compose \
&& chmod +x /usr/local/bin/docker-compose
&& chmod +x /usr/local/bin/docker-compose

ENV COMPOSE_IGNORE_ORPHANS true

COPY entrypoint.sh .
COPY upgrade_*.sh ./
COPY upgrades ./upgrades
COPY scripts ./scripts
COPY deb ./deb

ENTRYPOINT [ "/usr/src/app/entrypoint.sh" ]
Binary file added build/deb/usbmount_0.0.200_all.deb
Binary file not shown.
14 changes: 8 additions & 6 deletions build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ docker-compose -f /usr/src/app/DNCORE/docker-compose-dappmanager.yml up -d
docker-compose -f /usr/src/app/DNCORE/docker-compose-admin.yml up -d
docker-compose -f /usr/src/app/DNCORE/docker-compose-wifi.yml up -d

if [ -n "`grep \"restart: always\" /usr/src/app/DNCORE/docker-compose-core.yml`" ]; then
sed -i 's/restart: always//g' /usr/src/app/DNCORE/docker-compose-core.yml
docker-compose -f /usr/src/app/DNCORE/docker-compose-core.yml up -d
fi
# Copy host scripts and packages
mkdir -p /usr/src/app/DNCORE/scripts/upgrade
cp -rf ./scripts/* /usr/src/app/DNCORE/scripts/upgrade
chmod +x /usr/src/app/DNCORE/scripts/upgrade/*.sh
cp -fr ./deb /usr/src/app/DNCORE/scripts/upgrade/

# Apply all upgrades
for filename in ./upgrade_*.sh; do
# Apply all local upgrades
for filename in ./upgrades/upgrade_*.sh; do
echo "Applying upgrade ${filename}..."
sh "${filename}"
done
28 changes: 28 additions & 0 deletions build/scripts/install_usbmount.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -euo pipefail

USBMOUNT_PKG="usbmount_0.0.200_all.deb"
USBMOUNT_PATH="/usr/src/dappnode/DNCORE/scripts/upgrade/deb/$USBMOUNT_PKG"
TMP_DIR="/tmp/dappnode"

if [ ! -f "/etc/os-release" ]; then
echo "Cannot detect OS flavor, exiting."
exit 1
fi

if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root."
exit 1
fi

source /etc/os-release

if [ "$ID" == "ubuntu" ] || [ "$ID" == "debian" ]; then
DEBIAN_FRONTEND=noninteractive apt update -y
DEBIAN_FRONTEND=noninteractive apt install -y "${USBMOUNT_PATH}"
else
echo "Distribution not supported, exiting."
exit 1
fi

echo "-> ${USBMOUNT_PKG} package installed successfully."
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions build/upgrades/upgrade_003.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

# Run script on the host with the nsenter tool
docker run --rm --privileged --pid=host -t alpine:3.8 nsenter -t 1 -m -u -n -i /usr/src/dappnode/DNCORE/scripts/upgrade/install_usbmount.sh
13 changes: 7 additions & 6 deletions dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "core.dnp.dappnode.eth",
"version": "0.2.23",
"version": "0.2.24",
"description": "DAppNode package responsible for manage the core packages",
"avatar": "/ipfs/QmS4kGwYA8n918xdNUgFt8MCfnsR8pjmzphS59BL7qtLq2",
"type": "dncore",
"image": {
"path": "",
"hash": "",
"size": "",
"path": "core.dnp.dappnode.eth_0.2.24.tar.xz",
"hash": "/ipfs/QmQj43An9HkfYoEDTB5ZzoVqq3f55i6qnx26d8NSppfbWZ",
"size": 32877428,
"restart": "on-failure",
"volumes": [
"/usr/src/dappnode/DNCORE/:/usr/src/app/DNCORE/",
"/var/run/docker.sock:/var/run/docker.sock"
Expand Down Expand Up @@ -40,8 +41,8 @@
"ethforward.dnp.dappnode.eth": "0.2.3",
"vpn.dnp.dappnode.eth": "0.2.4",
"wamp.dnp.dappnode.eth": "0.2.0",
"admin.dnp.dappnode.eth": "0.2.11",
"dappmanager.dnp.dappnode.eth": "0.2.22",
"admin.dnp.dappnode.eth": "0.2.12",
"dappmanager.dnp.dappnode.eth": "0.2.23",
"wifi.dnp.dappnode.eth": "0.2.0"
},
"changelog": "",
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ networks:
services:
core.dnp.dappnode.eth:
build: ./build
image: 'core.dnp.dappnode.eth:0.2.23'
restart: 'no'
image: 'core.dnp.dappnode.eth:0.2.24'
container_name: DAppNodeCore-core.dnp.dappnode.eth
volumes:
- '/usr/src/dappnode/DNCORE/:/usr/src/app/DNCORE/'
Expand Down
7 changes: 7 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,12 @@
"dappnode": "Wed, 04 Dec 2019 21:51:39 GMT"
},
"link": "http://my.dappnode/#/sdk/publish/r=core.dnp.dappnode.eth&v=0.2.21&h=%2Fipfs%2FQmUauENjpNqzJ97uBdbtGw9QDZysXMXxJo35H7gvH5apNj"
},
"0.2.24": {
"hash": "/ipfs/QmaKc1DwTuQUY1p2s51o1fyRohmKmwc7HSeGYS4MPMemTQ",
"type": "manifest",
"uploadedTo": {
"dappnode": "Thu, 26 Dec 2019 18:45:04 GMT"
}
}
}

0 comments on commit 0b823bf

Please sign in to comment.