Skip to content

Commit 695cdb5

Browse files
committed
Merge branch 'release/1.1.1' into 1.0-master
2 parents a2e1c23 + e9b8f8b commit 695cdb5

File tree

221 files changed

+4179
-2303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+4179
-2303
lines changed

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.dockerignore
2+
3+
.DS_Store
4+
5+
**/node_modules
6+
.gradle
7+
**/.gradle
8+
!**/build.gradle
9+
!**/settings.gradle
10+
11+
.idea
12+
13+
# **/build/*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ flow.properties
2121
node_modules/
2222
.tmp/
2323
*.sublime-*
24+
.vscode/

.travis.yml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
language: java
2-
jdk:
3-
- oraclejdk8
4-
env:
5-
- NODE_VERSION=6.1
6-
sudo: true
1+
dist: trusty
2+
sudo: required
3+
services:
4+
- docker
5+
76
before_install:
8-
- echo 'America/Los_Angeles' | sudo tee /etc/timezone
9-
- sudo dpkg-reconfigure --frontend noninteractive tzdata
10-
install:
11-
- nvm install $NODE_VERSION
12-
- nvm use $NODE_VERSION
13-
- npm install -g typings
14-
- ./shared/dev-tasks/install-dependencies.sh
7+
- ./.travis/download.sh
8+
159
script:
16-
- nvm use $NODE_VERSION
17-
- if [[ $TRAVIS_SECURE_ENV_VARS == true ]]; then
18-
./gradlew check;
19-
else
20-
./gradlew jshint;
21-
fi
10+
- docker-compose build
11+
- docker-compose run marklogic

.travis/Dockerfile-java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM openjdk:8
2+
VOLUME /code
3+
ADD ./ /code
4+
WORKDIR /code
5+
ENTRYPOINT [ "sh", "-c", "./gradlew check" ]

.travis/Dockerfile-ml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM centos:centos7
2+
3+
ENV LANG C.UTF-8
4+
5+
RUN yum -y install glibc.i686 \
6+
gdb.x86_64 redhat-lsb.x86_64 vim \
7+
bzip2 \
8+
unzip \
9+
xz-utils \
10+
java-1.8.0-openjdk-devel 2>&1 > /dev/null
11+
12+
# Install MarkLogic
13+
COPY ./MarkLogic.rpm /tmp/MarkLogic.rpm
14+
15+
RUN yum -y install /tmp/MarkLogic.rpm 2>&1 > /dev/null
16+
17+
# Expose MarkLogic Server ports - add additional ones for your REST, etc
18+
# endpoints
19+
EXPOSE 7997-8002
20+
21+
# init
22+
COPY .travis/startml.sh /tmp/startml.sh
23+
RUN chmod 755 /tmp/startml.sh
24+
COPY .travis/setup.sh /tmp/setup.sh
25+
RUN chmod 755 /tmp/setup.sh
26+
RUN /tmp/setup.sh
27+
28+
VOLUME /marklogic-data-hub
29+
ADD ./ /marklogic-data-hub
30+
WORKDIR /marklogic-data-hub
31+
32+
RUN ./gradlew tasks 2>&1 > /dev/null
33+
34+
# Define default command (which avoids immediate shutdown)
35+
CMD /tmp/startml.sh && ./gradlew test

.travis/download.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
# runs command from parameters and exits with the eoror code of the command
4+
# if it fails
5+
function successOrExit {
6+
"$@"
7+
local status=$?
8+
if [ $status -ne 0 ]; then
9+
echo "$1 exited with error: $status"
10+
exit $status
11+
fi
12+
}
13+
14+
set | grep TRAVIS
15+
16+
test $1 && arg1=$1
17+
18+
ver=${ML_VERSION}
19+
fname=MarkLogic-RHEL7-${ver}.x86_64.rpm
20+
fnamedeb="marklogic_"
21+
fnamedeb=$fnamedeb$ver
22+
suff="_amd64.deb"
23+
fnamedeb=$fnamedeb$suff
24+
25+
echo "Logging in for Download"
26+
curl -s -c cookies.txt --data "email=${MLBUILD_USER}&password=${MLBUILD_PASSWORD}" https://developer.marklogic.com/login > /dev/null 2>&1
27+
28+
echo
29+
echo "Getting Download Link"
30+
dl_link=$(curl -s -b cookies.txt --data "download=/download/binaries/8.0/${fname}" https://developer.marklogic.com/get-download-url | perl -pe 's/.*"path":"([^"]+).*/\1/')
31+
url="https://developer.marklogic.com${dl_link}"
32+
33+
echo "********* Downloading MarkLogic $ver"
34+
successOrExit curl -s -k -o ./MarkLogic.rpm $url

.travis/setup.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/sh
2+
#
3+
# Initializes a virgin MarkLogic installation.
4+
5+
HOST=localhost
6+
ADMINUSER=admin
7+
ADMINPASSWORD=admin
8+
9+
/tmp/startml.sh
10+
11+
until curl -fsS --head --digest --user "$ADMINUSER":"$ADMINPASSWORD" http://"$HOST":8001/admin/v1/timestamp # &>/dev/null
12+
do
13+
echo "MarkLogic hasn't started yet. Retrying in 3 seconds…"
14+
sleep 3
15+
done
16+
17+
# curl -X POST --data "" http://"$HOST":8001/admin/v1/init
18+
echo "Initializing…"
19+
curl --fail --show-error --silent -X POST --data "" http://"$HOST":8001/admin/v1/init 1>/dev/null
20+
if [[ $? != 0 ]] ; then
21+
echo "error on init"
22+
exit 1
23+
fi
24+
echo "Completed initialization. Waiting for restart…"
25+
sleep 20
26+
27+
# curl -fsS --head --digest --user admin:"$ADMINPASSWORD" http://"$HOST":8001/admin/v1/timestamp
28+
# One liner: until curl -fsS --head http://192.168.56.101:8001/admin/v1/timestamp --digest --user admin:admin; do sleep 5; done
29+
30+
31+
until curl -fsS --head --digest --user "$ADMINUSER":"$ADMINPASSWORD" http://"$HOST":8001/admin/v1/timestamp &>/dev/null
32+
do
33+
echo "Restart hasn't completed. Retrying in 3 seconds…"
34+
sleep 3
35+
done
36+
37+
# curl -X POST -H "Content-type: application/x-www-form-urlencoded" --data "admin-username=admin" --data "admin-password=********" http://localhost:8001/admin/v1/instance-admin
38+
echo "Starting instance administration…"
39+
curl --fail --show-error --silent \
40+
-X POST -H "Content-type: application/x-www-form-urlencoded" \
41+
--data "admin-username=${ADMINUSER}" --data "admin-password=${ADMINPASSWORD}" --data "realm=public" \
42+
http://"$HOST":8001/admin/v1/instance-admin 1>/dev/null
43+
if [[ $? != 0 ]] ; then
44+
echo "Error on instance-admin"
45+
exit 1
46+
fi
47+
48+
echo "Completed instance administration. Waiting for restart…"
49+
sleep 10
50+
until curl -fsS --head --digest --user admin:"$ADMINPASSWORD" http://"$HOST":8001/admin/v1/timestamp &>/dev/null
51+
do
52+
echo "Restart hasn't completed. Retrying in 5 seconds…"
53+
sleep 5
54+
done
55+
56+
echo "Turning off log file rotation"
57+
curl --fail --show-error --silent \
58+
-X PUT --digest -u "$ADMINUSER":"$ADMINPASSWORD" -H "Content-type: application/json" \
59+
-d '{"rotate-log-files":"never"}' http://"$HOST":8002/manage/v2/groups/Default/properties &>/dev/null
60+
61+
echo "Done!"
62+
exit 0

.travis/startml.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
export MARKLOGIC_INSTALL_DIR=/opt/MarkLogic
4+
export MARKLOGIC_DATA_DIR=/data
5+
6+
export MARKLOGIC_FSTYPE=ext4
7+
export MARKLOGIC_USER=daemon
8+
export MARKLOGIC_PID_FILE=/var/run/MarkLogic.pid
9+
export MARKLOGIC_MLCMD_PID_FILE=/var/run/mlcmd.pid
10+
export MARKLOGIC_UMASK=022
11+
12+
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/MarkLogic/mlcmd/bin
13+
export LD_PRELOAD=/opt/MarkLogic/lib/libjemalloc.so.1
14+
export LD_LIBRARY_PATH=/opt/MarkLogic/lib:/data/Lib
15+
16+
echo "STARTING MARKLOGIC"
17+
18+
/opt/MarkLogic/bin/MarkLogic

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
11
# Change Log
22

3-
## [v1.1.0](https://github.com/marklogic/marklogic-data-hub/tree/v1.1.0)
3+
## [v1.1.1](https://github.com/marklogic/marklogic-data-hub/tree/v1.1.1)
44

5+
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.1.0...v1.1.1)
6+
7+
**Implemented enhancements:**
8+
9+
- customize session name to avoid conflicts [\#369](https://github.com/marklogic/marklogic-data-hub/issues/369)
10+
- Change Java Client API dependency to stable build [\#358](https://github.com/marklogic/marklogic-data-hub/issues/358)
11+
- Update Hub to use latest ml-gradle [\#355](https://github.com/marklogic/marklogic-data-hub/issues/355)
12+
13+
**Closed issues:**
14+
15+
- Entities and custom modules fail to deploy - v1.1.0 [\#377](https://github.com/marklogic/marklogic-data-hub/issues/377)
16+
- See if we can bail if the gradle version is too low [\#376](https://github.com/marklogic/marklogic-data-hub/issues/376)
17+
- Unable to login marklogic using hub frame work received "500 Internal Server Error" [\#374](https://github.com/marklogic/marklogic-data-hub/issues/374)
18+
- gradle plugin gets confused about users [\#371](https://github.com/marklogic/marklogic-data-hub/issues/371)
19+
- can't put binary inside envelope [\#366](https://github.com/marklogic/marklogic-data-hub/issues/366)
20+
- MLCP can't find /etc/hadooop [\#365](https://github.com/marklogic/marklogic-data-hub/issues/365)
21+
- Add CLA requirement to CONTRIBUTING [\#361](https://github.com/marklogic/marklogic-data-hub/issues/361)
22+
- Bug: QuickStart Login screen: Long paths aren't completely visible in Chrome [\#354](https://github.com/marklogic/marklogic-data-hub/issues/354)
23+
24+
**Merged pull requests:**
25+
26+
- Adds CLA requirement \(\#361\) [\#363](https://github.com/marklogic/marklogic-data-hub/pull/363) ([jmakeig](https://github.com/jmakeig))
27+
- Adds CLA requirement \(\#361\) [\#362](https://github.com/marklogic/marklogic-data-hub/pull/362) ([jmakeig](https://github.com/jmakeig))
28+
- Updates Java Client API dependency to stable build [\#359](https://github.com/marklogic/marklogic-data-hub/pull/359) ([jmakeig](https://github.com/jmakeig))
29+
30+
## [v1.1.0](https://github.com/marklogic/marklogic-data-hub/tree/v1.1.0) (2016-12-16)
531
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.2...v1.1.0)
632

733
**Implemented enhancements:**

CONTRIBUTING.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,29 @@ To build the entire DHF (marklogic-data-hub.jar, quickstart.war, and ml-data-hub
3636

3737
```bash
3838
cd /path/to/data-hub-project/
39-
gradle build -x test
39+
./gradlew build -x test
40+
```
41+
42+
#### Running your local hub instead of the cloud hosted one
43+
```bash
44+
cd /path/to/data-hub-project/
45+
./gradlew publishToMavenLocal
46+
cd /path/to/data-hub-project/ml-data-hub-plugin
47+
./gradlew publishToMavenLocal
48+
```
49+
50+
Then in your build.gradle file you will need to use the local version:
51+
```groovy
52+
buildscript {
53+
repositories {
54+
mavenLocal()
55+
jcenter()
56+
}
57+
dependencies {
58+
classpath "com.marklogic:ml-data-hub:(the version number you chose)"
59+
}
60+
}
61+
apply plugin: "com.marklogic.ml-data-hub"
4062
```
4163

4264
#### Running the QuickStart UI from source
@@ -47,7 +69,7 @@ You will need to open two terminal windows.
4769
**Terminal window 1** - This runs the webapp.
4870
```bash
4971
cd /path/to/data-hub-project
50-
gradle bootrun
72+
./gradlew bootrun
5173
```
5274

5375
**Terminal window 2** - This runs the Quickstart UI
@@ -152,7 +174,7 @@ $ git rebase upstream/1.0-develop
152174
Make sure the JUnit tests pass.
153175

154176
```sh
155-
$ gradle test
177+
$ ./gradlew test
156178
```
157179

158180
Make sure that all tests pass. Please, do not submit patches that fail.
@@ -163,6 +185,10 @@ Make sure that all tests pass. Please, do not submit patches that fail.
163185
$ git push origin my-feature-branch
164186
```
165187

188+
#### Agree to the contributor License
189+
190+
Before we can merge your changes, you need to sign a [Contributor License Agreement](http://developer.marklogic.com/products/cla). You only need to do this once.
191+
166192
#### Submit the pull request
167193

168194
Go to https://github.com/username/marklogic-data-hub and select your feature branch. Click

0 commit comments

Comments
 (0)