Skip to content

Commit

Permalink
Merge branch 'release/v0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
gear54rus committed Jan 11, 2016
2 parents d36f54b + bc3e7a6 commit 3f20a9c
Showing 1 changed file with 45 additions and 4 deletions.
49 changes: 45 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
# aps-node-runtime
APS Endpoint Runtime implementation in Node.js

This repository uses **git flow**.
This repository uses **git flow** with the following config:

```
[gitflow "branch"]
master = master
develop = dev
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/
versiontag =
support = support/
```

## How do I test it?

You will need NodeJS for all activities. To quickly install it, you can use these commands:

wget https://nodejs.org/dist/v5.4.0/node-v5.4.0-linux-x64.tar.gz && tar xvf node-v5.4.0-linux-x64.tar.gz && cd node-v5.4.0-linux-x64 && cp -r */ /usr && cd ..

This will install `node` along with `npm` with `/usr` prefix. Use `node -v` and `npm -v` to check.

Currently, about **80%** of insfrastructure and routing is completed. However, only about **5%** of user code API and APS functionality is done. If you want to go ahead and test what's working, follow the steps below, and remember, **contributions are welcome in all forms (issues, pull requests, etc.)**.

You need a working OA 6.0 installation with APS. Download the latest RPM from [releases](../../releases) section or [build it yourself](#building-rpm-from-source).
Expand Down Expand Up @@ -44,6 +62,29 @@ It will generally tell you what's wrong if it doesn't start. You can check the m

You can also check and adjust main daemon configuration file at `/etc/aps/node/config.json`.

When you fix all issues that prevent it from starting, you will see something similar to this:

```
[root@endpoint node]# aps-node start
Starting APS Node.js daemon... [ OK ] PID: 851
0.0.0.0
└─┬ 443
└─┬ (*)
└── /test - 'c72'
More information may be available in '/var/log/aps-node.log'.
```

That output includes a PID of a newly started daemon as well as location of a main log file (also featured before) and a routing table for all active endpoints (it's a tree that has these levels `ip->port->virtualHost->name` and also includes the ID of each endpoint in single quotes). You can check that it's running:

```
[root@endpoint node]# ps auxf | grep 851
aps-node 851 1.6 0.6 1048000 55656 pts/0 Sl 11:24 0:01 /usr/bin/node daemon.js
```

Here it is, dropped its privileges and is now running as `aps-node`.

That's it! You can now use this host the same way you did with PHP runtime. You can use [VPS Cloud Basic](http://dev.apsstandard.org/apps/2.0/APS%20team/Sample%20VPS%20Cloud%20Basic/APS%20team/) for testing the functionality (it has service named `clouds` out of the box).

## How do I create an endpoint?

In PHP runtime, that task was performed by `endpoint.sh` script. For this runtime, the task is not yet automated (althoug it will probably be performed by the same `aps-node` script in the future).
Expand Down Expand Up @@ -182,8 +223,8 @@ Good luck! :grinning:

You will need:

- Centos > 6
- NodeJS > 5
- Centos >= 6
- NodeJS >= 5
- NPM that comes with it
- Babel 5.8.34
- `rpmbuild` command
Expand All @@ -194,7 +235,7 @@ Steps:

- Download the [latest source ZIP](../../archive/dev.zip).
- `unzip dev.zip`
- `cd apsaps-node-runtime-dev/build`
- `cd aps-node-runtime-dev/build`
- `chmod +x build.sh`
- `./build.sh`
- If you want to prevent cleanup after build process (e.g. to examine individual stages), run `./build.sh debug`
Expand Down

0 comments on commit 3f20a9c

Please sign in to comment.