Skip to content

Commit

Permalink
Add frontend dist into package
Browse files Browse the repository at this point in the history
From v0.3.0, goconserver support a simple web interface, this patch
add the static files info tar, deb and rpm packages.
  • Loading branch information
chenglch committed May 30, 2018
1 parent 6f05add commit 46e9636
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
GOPATH?=$(shell pwd)
export GOPATH
PATH+=:$(shell pwd)/bin
export PATH
GITHUB_DIR=${GOPATH}/src/github.com/xcat2/
REPO_DIR=${GOPATH}/src/github.com/xcat2/goconserver
CURRENT_DIR=$(shell pwd)
Expand All @@ -11,6 +9,7 @@ SERVER_CONF_FILE=/etc/goconserver/server.conf
CLIENT_CONF_FILE=~/congo.sh
SERVER_BINARY=goconserver
CLIENT_BINARY=congo
SHELL=/bin/bash
COMMIT=$(shell git rev-parse HEAD)
ARCH=$(shell uname -m)
PLATFORM=$(shell uname)
Expand Down Expand Up @@ -70,12 +69,13 @@ install: build
cp etc/goconserver/client.sh /etc/profile.d/congo.sh; \
fi

tar: build
tar: build frontend
mkdir -p build/goconserver_${PLATFORM}_${ARCH}; \
cp -r etc build/goconserver_${PLATFORM}_${ARCH}; \
cp -r scripts build/goconserver_${PLATFORM}_${ARCH}; \
cp ${SERVER_BINARY} build/goconserver_${PLATFORM}_${ARCH}; \
cp ${CLIENT_BINARY} build/goconserver_${PLATFORM}_${ARCH}; \
cp -r build/dist build/goconserver_${PLATFORM}_${ARCH}; \
cd build/goconserver_${PLATFORM}_${ARCH}; \
ln -s scripts/setup.sh setup.sh; \
cd - ;\
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ api interface.
### Storage plugins

- file: Store the host information in a json file.
- etcd: Support goconserver cluster [experimental].
- etcd: Support goconserver cluster.

### Multiple client types

Expand Down Expand Up @@ -114,6 +114,7 @@ Setup nodejs(9.0+) and npm(5.6.0+) toolkit at first. An example steps could be
found at [node env](/frontend/). Then follow the steps below:

```
yum install gcc-c++
npm install -g gulp webpack webpack-cli
make frontend
```
Expand Down
1 change: 1 addition & 0 deletions dirty-rpmbuild
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ mkdir -p \$RPM_BUILD_ROOT/%{prefix}
%config(noreplace) /etc/profile.d/congo.sh
/etc/goconserver
%config(noreplace) /etc/goconserver/server.conf
/usr/share/goconserver/dist/
/usr/lib/systemd/system/goconserver.service
/usr/bin/goconserver
/usr/bin/congo
Expand Down
7 changes: 6 additions & 1 deletion prep-tarball
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ mkdir -p "${TMP_DIR}/repack/usr/bin"
mkdir -p "${TMP_DIR}/repack/usr/lib/systemd/system"
mkdir -p "${TMP_DIR}/repack/var/log/goconserver/nodes"
mkdir -p "${TMP_DIR}/repack/var/lib/goconserver"
mkdir -p "${TMP_DIR}/repack/usr/share/goconserver/dist"
chmod 0700 "${TMP_DIR}/repack/etc/goconserver" \
"${TMP_DIR}/repack/var/log/goconserver" \
"${TMP_DIR}/repack/var/log/goconserver/nodes" \
"${TMP_DIR}/repack/var/lib/goconserver"
"${TMP_DIR}/repack/var/lib/goconserver" \
"${TMP_DIR}/repack/usr/share/goconserver"
install -o root -g root -m 0755 \
"${TMP_DIR}/extract/goconserver_linux_${ARCH}/goconserver" \
"${TMP_DIR}/repack/usr/bin"
Expand All @@ -105,6 +107,9 @@ install -o root -g root -m 0644 \
install -o root -g root -m 0644 \
"${TMP_DIR}/extract/goconserver_linux_${ARCH}/etc/systemd/goconserver.service" \
"${TMP_DIR}/repack/usr/lib/systemd/system"
install -o root -g root -m 0644 -D \
"${TMP_DIR}/extract/goconserver_linux_${ARCH}/dist/"* \
"${TMP_DIR}/repack/usr/share/goconserver/dist"

( cd "${TMP_DIR}/repack" && tar cfz - *) >"${GOCONSERVER_REPACK_TARBALL}"

Expand Down

0 comments on commit 46e9636

Please sign in to comment.