Skip to content
This repository was archived by the owner on May 30, 2019. It is now read-only.

Commit 86d0a82

Browse files
Charles Greerlaurelnaiad
authored andcommitted
README update, and delete scripts dir
1 parent 79bf725 commit 86d0a82

File tree

11 files changed

+115
-171
lines changed

11 files changed

+115
-171
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
# most of the ignored files are platform-specific
2+
/scripts/

README.md

Lines changed: 114 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,133 @@
22

33
README for Version 1.0.0-ea2
44

5-
A demonstration of using MarkLogic in a three-tier application architecture.
6-
7-
The application implements a "Question and Answer" Scenario.
5+
Samplestack is a demo "Question and Answer" web application that shows you how to integrate MarkLogic into a three-tier application architecture (browser, application server, and database).
86

97
This release features a middle tier for the Java Enterprise Developer, implemented using Java, Spring, and Gradle.
108

11-
## Usage
9+
The project includes the following major components:
10+
* Web/browser front end based on Angular.js
11+
* Middle appserver tier implemented in Java/Spring
12+
* Database tier hosted on MarkLogic
13+
* Gradle framework to drive build and configuration of the appserver and database tiers
14+
* Unit tests
15+
16+
This README covers the following topics:
17+
* [Prerequisites](#prerequisites)
18+
* [Getting Started](#getting-started)
19+
* [Additional Information](#additional-information)
20+
* [License](#license)
21+
22+
## Prerequisites
23+
To configure and use this application, you need the following software:
24+
* Java JDK 1.7
25+
* MarkLogic 8 EA2 (see instructions [below](#getting-started))
26+
* Node.js, version 0.10 or later. See [nodejs.org](http://nodejs.org).
27+
* A global installation of the Node.js components [bower](http://bower.io) and [gulp](https://github.com/gulpjs/gulp). For details, see [Global Utilities](browser/README.md#global-utilities) in the [browser README](browser/README.md).
28+
29+
The setup instructions assume you have the `git`, `javac`, `node`, `bower`, and `gulp` commands on your path.
30+
31+
The setup procedure may install additional software, such as Gradle and Angular.
32+
33+
## Getting Started
34+
Follow this procedure to set up samplestack in your environment.
35+
36+
1. Install MarkLogic 8 Early Access. See http://ea.marklogic.com/download.
37+
38+
2. Start MarkLogic. For details, see the [MarkLogic Installation Guide](http://docs.marklogic.com/guide/installation/procedures#id_92457).
1239

13-
### Prerequisites
40+
3. Clone this repository. For example, run the following command:
41+
42+
```
43+
git clone https://github.com/marklogic/marklogic-samplestack
44+
```
45+
4. [Set up the middle and database tiers](#setting-up-the-middle-and-database-tiers).
46+
47+
5. [Set up the browser tier](#setting-up-the-browser-tier).
48+
49+
50+
### Setting Up the Middle and Database Tiers
51+
The setup assume you have MarkLogic Server running on your localhost and that your Admin user credentials are admin:admin. To change this, modify `appserver/java-spring/gradle.properties`.
52+
53+
To install required software, configure, and build the Java middle tier and database tier of samplestack, run the following commands from the root of your cloned repository:
1454
15-
* install MarkLogic and start it: http://ea.marklogic.com/download
16-
* clone this repository:
1755
```bash
18-
git clone https://github.com/marklogic/marklogic-samplestack
56+
cd appserver/java-spring
57+
./gradlew appserver
1958
```
2059

21-
### Java/Spring implementation
60+
If the command fails such that you need to run it again, run the following command first to reset the database state:
2261

23-
*See the [README in appserver/java-spring directory](appserver/java-spring/README.md)*
62+
```bash
63+
./gradlew dbteardown
64+
```
2465

25-
* `cd appserver/java-spring`
26-
* `./gradlew appserver`
66+
This command will not return. When you see output of the following form, the mi ddle tier is running, and you can proceed with the browser tier setup:
67+
```
68+
Started Application in X seconds...
69+
>Building 85% > :bootRun
70+
```
71+
72+
Successfully completing this step does the following:
73+
* Bootstraps the middle tier.
74+
* Builds the Java middle tier components.
75+
* Loads the database with sample data.
76+
* Starts up the middle tier and MarkLogic application services.
77+
78+
The middle tier App Server runs on port 8090 by default. Visit http://localhost:8001 if you need to administer the database.
79+
80+
*For details, see the [README in the appserver/java-spring directory](appserver/java-spring/README.md)*
81+
82+
### Setting Up the Browser Tier
83+
Use the following procedure To install required software and bootstrap the samplestack browser tier. You should already have the middle and database tiers running.
84+
85+
For detailed instructions and troubleshooting, see the [README in the browser directory](browser/README.md).
86+
87+
**NOTE:** If you are on Windows, you must use a Windows command shell, not Cygwin.
88+
89+
1. Go to the browser subdirectory of the project:
2790

28-
See README.md in appserver/java-spring for further information on the samplestack-java
91+
```bash
92+
cd browser
93+
```
94+
2. Install the browser application.
2995

30-
### Browser/Web Application
96+
```bash
97+
npm install
98+
bower install
99+
```
100+
3. Run the following command to build the web application, run its unit tests, and bring up the required execution environment:
101+
102+
```bash
103+
gulp run
104+
```
105+
106+
When the setup successfully completes, you should see information about the available web servers running the application. The `gulp run` command does not return.
107+
108+
### Running the Application
109+
Once you have the database, appserver, and browser tiers of the application configured and running, navigate to the following URL in your browser to explore the application:
110+
111+
`http://localhost:3000/`
112+
113+
To restart the middle tier App Server and browser tier web servers in the future, run the following commands:
114+
```bash
115+
cd appserver/java-spring
116+
./gradlew bootrun
117+
cd ../../browser
118+
gulp run
119+
```
31120

32-
*See the [README in the browser directory](browser/README.md)*
121+
### Next Steps
122+
* Explore the application running at http://localhost:3000.
123+
* Explore the README in the database, appserver and browser directories for details on each tier.
124+
* View the database configuration by visiting http://localhost:8001.
125+
* Explore the database contents using Query Console. Go to http://localhost:8000/qconsole, select the samplestack database, and click Explore.
126+
127+
## Additional Information
128+
For more information, see the following:
129+
* README for the [database](database/README.md), [appserver](appserver/java-spring/README.md), and [browser](browser/README.md) tier.
130+
* [Samplestack wiki](wiki).
131+
* [MarkLogic product documentation](http://docs-ea.marklogic.com). The credentials are available on the MarkLogic EA download page.
33132

34133
## License
35134

scripts/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/crud.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/dircontrib.xml

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/mlcp-loads.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

scripts/options.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

scripts/packages.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

scripts/roles-perms.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

scripts/search.sh

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)