Make OMK SPOC-compatible
This commit is contained in:
parent
fea0a7911a
commit
7a45daf853
@ -46,7 +46,7 @@ Assign the newly generated key to your GitLab account
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
git clone --recurse-submodules ssh://git@git.spotter.cz:2222/Spotter-Cluster/Spotter-Cluster.git
|
git clone --recursive ssh://git@git.spotter.cz:2222/Spotter-Cluster/Spotter-Cluster.git
|
||||||
|
|
||||||
# Install the build toolchain
|
# Install the build toolchain
|
||||||
Spotter-Cluster/build/install-toolchain.sh
|
Spotter-Cluster/build/install-toolchain.sh
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/execlineb -P
|
#!/bin/execlineb -P
|
||||||
|
|
||||||
foreground { add-ca-cert }
|
foreground { /bin/add-ca-cert }
|
||||||
s6-setuidgid ckandp
|
s6-setuidgid ckandp
|
||||||
uwsgi --plugin python --http-socket 0.0.0.0:8080 --wsgi-file /etc/ckan-datapusher/datapusher.wsgi --enable-threads
|
uwsgi --plugin python --http-socket 0.0.0.0:8080 --wsgi-file /etc/ckan-datapusher/datapusher.wsgi --enable-threads
|
||||||
|
18
lxc-apps/openmapkit/app
Normal file
18
lxc-apps/openmapkit/app
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"version": "0.12.0-200313",
|
||||||
|
"meta": {
|
||||||
|
"title": "OpenMapKit",
|
||||||
|
"desc-cs": "Sběr mapových dat",
|
||||||
|
"desc-en": "Map data collection",
|
||||||
|
"license": "GPL"
|
||||||
|
},
|
||||||
|
"containers": {
|
||||||
|
"openmapkit": {
|
||||||
|
"image": "openmapkit_0.12.0-200313",
|
||||||
|
"mounts": {
|
||||||
|
"openmapkit/omk_conf/settings.js": "srv/openmapkit/settings.js:file",
|
||||||
|
"openmapkit/omk_data": "srv/openmapkit/data"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
IMAGE openmapkit_0.12.0-190620
|
IMAGE openmapkit_0.12.0-200313
|
||||||
FROM alpine3.9-java8_8.212.04-190620
|
FROM alpine3.11-java8_8.242.08-200313
|
||||||
|
|
||||||
RUN EOF
|
RUN EOF
|
||||||
# Install runtime dependencies
|
# Install runtime dependencies
|
||||||
@ -9,11 +9,10 @@ RUN EOF
|
|||||||
apk --no-cache add --virtual .deps build-base git py2-pip yarn
|
apk --no-cache add --virtual .deps build-base git py2-pip yarn
|
||||||
|
|
||||||
# Clone OpenMapKit
|
# Clone OpenMapKit
|
||||||
git clone --depth 1 https://github.com/posm/OpenMapKitServer /srv/openmapkit
|
git clone --recursive --depth 1 https://github.com/posm/OpenMapKitServer /srv/openmapkit
|
||||||
cd /srv/openmapkit
|
|
||||||
git submodule update --init #TODO: Why does this fail?
|
|
||||||
|
|
||||||
# Install OpenMapKit dependencies
|
# Install OpenMapKit dependencies
|
||||||
|
cd /srv/openmapkit
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
yarn add libxmljs
|
yarn add libxmljs
|
||||||
yarn
|
yarn
|
||||||
@ -34,6 +33,6 @@ RUN EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# s6 required for single service due to inability of nodejs to process signals when running as PID 1
|
# s6 required for single service due to inability of nodejs to process signals when running as PID 1
|
||||||
COPY lxc
|
COPY image.d
|
||||||
|
|
||||||
CMD /bin/s6-svscan /etc/services.d
|
CMD /bin/s6-svscan /etc/services.d
|
@ -1,15 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
|
# Volumes
|
||||||
|
OMK_CONF="${VOLUMES_DIR}/openmapkit/omk_conf"
|
||||||
|
OMK_DATA="${VOLUMES_DIR}/openmapkit/omk_data"
|
||||||
|
|
||||||
# Configure OpenMapKit
|
# Configure OpenMapKit
|
||||||
export OPENMAPKIT_ADMIN_USER="admin"
|
export OPENMAPKIT_ADMIN_USER="admin"
|
||||||
export OPENMAPKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
export OPENMAPKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
||||||
mkdir -p /srv/openmapkit/omk_conf
|
install -o 108080 -g 108080 -m 750 -d ${OMK_CONF}
|
||||||
chown -R 108080:108080 /srv/openmapkit/omk_conf
|
envsubst <omk_conf/settings.js | install -o 108080 -g 108080 -m 640 /dev/stdin ${OMK_CONF}/settings.js
|
||||||
envsubst <omk_conf/settings.js >/srv/openmapkit/omk_conf/settings.js
|
|
||||||
|
|
||||||
# Copy existing files into persistent storage
|
# Copy existing files into persistent storage
|
||||||
lxchelper extract openmapkit /srv/openmapkit/data /srv/openmapkit/omk_data
|
cp -rp ${LAYERS_DIR}/openmapkit_0.12.0-200313/srv/openmapkit/data ${OMK_DATA}
|
||||||
|
|
||||||
# Register application
|
# Register application
|
||||||
vmmgr register-app openmapkit omk "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}"
|
vmmgr register-app openmapkit omk "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}"
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "0.12.0-190620",
|
|
||||||
"meta": {
|
|
||||||
"title": "OpenMapKit",
|
|
||||||
"desc-cs": "Sběr mapových dat",
|
|
||||||
"desc-en": "Map data collection",
|
|
||||||
"license": "GPL"
|
|
||||||
},
|
|
||||||
"containers": {
|
|
||||||
"openmapkit": {
|
|
||||||
"image": "openmapkit_0.12.0-190620",
|
|
||||||
"mounts": [
|
|
||||||
["FILE", "/srv/openmapkit/omk_conf/settings.js", "/srv/openmapkit/settings.js"],
|
|
||||||
["DIR", "/srv/openmapkit/omk_data", "/srv/openmapkit/data"]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user