Skip to content

Commit

Permalink
Merge pull request #32 from apiman/release/v0.3.0
Browse files Browse the repository at this point in the history
Release v0.3.0
  • Loading branch information
outofcoffee authored Mar 8, 2018
2 parents 5f9114a + 8a52585 commit 75bc975
Show file tree
Hide file tree
Showing 153 changed files with 4,570 additions and 983 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
build/
*.iml
classes
/bin/
.settings
.classpath
.project
/out/
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jdk:
services:
- docker
before_install:
- docker pull apiman/on-wildfly10:1.2.8.Final
- docker pull apiman/on-wildfly10:master
script:
- docker run -d -p 8080:8080 apiman/on-wildfly10:1.2.8.Final
- ./gradlew test -PintegrationTest --info --stacktrace
- docker run -d -p 8080:8080 apiman/on-wildfly10:master
- ./gradlew test -PintegrationTest --info --stacktrace
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.3.0] - 2018-03-08
### Added
- Allow gateway to be driven directly using declarations (Marc Savy). See _Changes_ section for details of changes to
the command syntax.
- Adds the ability to specify a definition for an API (Raleigh Pickard).
- Adds the ability to wait for the server to start before attempting to run commands (Pete Cornish).
- Improves documentation (Pete Cornish).

### Fixed
- Fixes #14. Fetches added plugin and uses generated ID in fetch test (Pete Cornish).

### Changed
- **Breaking change:** the syntax for administering the manager has changed. Where previously you would have written
`./apiman [command]` you would now write `./apiman manager [command]`.
- Factors out declarative application logic into separate services (Pete Cornish).
- Reorganises command package structure (Pete Cornish).

## [0.2.4] - 2017-11-29
### Added
- Adds the ability to wait for the server to start before attempting to run commands.
Expand Down
126 changes: 73 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Let's assume you have an _apiman_ server running on http://localhost:8080

Step 1: Create a new API:

$ ./apiman api create \
$ ./apiman manager api create \
--name example \
--endpoint http://example.com \
--initialVersion 1.0 \
Expand All @@ -19,7 +19,7 @@ Step 1: Create a new API:

Step 2: Publish it:

$ ./apiman api publish \
$ ./apiman manager api publish \
--name example \
--version 1.0 \
--orgName test
Expand All @@ -32,7 +32,7 @@ You can also manage your _apiman_ server.

Add a gateway:

$ ./apiman gateway create \
$ ./apiman manager gateway create \
--name test-gw \
--endpoint http://localhost:1234 \
--username apimanager \
Expand All @@ -41,7 +41,7 @@ Add a gateway:

Add a plugin:

$ ./apiman plugin add \
$ ./apiman manager plugin add \
--groupId io.apiman.plugins \
--artifactId apiman-plugins-test-policy \
--version 1.2.4.Final
Expand Down Expand Up @@ -85,7 +85,7 @@ Here's a simple YAML file (you can use JSON if you want):

### Step 2: Apply the environment declaration

$ ./apiman apply -f simple.yml
$ ./apiman manager apply -f simple.yml
INFO Loaded declaration: examples/declarative/simple.yml
INFO Adding org: test
INFO Adding API: example
Expand Down Expand Up @@ -113,11 +113,11 @@ You can also use placeholders in your declaration files. This helps you reuse de

...then pass them in when you run the _apply_ command:

./apiman apply -f simple.yml -P myApiEndpoint=http://example.com
./apiman manager apply -f simple.yml -P myApiEndpoint=http://example.com

Additionally, you can specify a properties files, containing key-value pairs, such as:

./apiman apply -f simple.yml --propertiesFile /path/to/placeholder.properties
./apiman manager apply -f simple.yml --propertiesFile /path/to/placeholder.properties

## Shared policies and properties

Expand All @@ -138,11 +138,17 @@ See the [shared-properties.yml](examples/declarative/shared-properties.yml) exam

# Usage

apiman plugin [args...]
apiman org [args...]
apiman api [args...]
apiman gateway [args...]
apiman apply [args...]
The CLI lets you control both the apiman Manager and apiman Gateway components.

Typically, you will administer the Manager, then publish your changes to the Gateway (as per the UI flow).

## Manager commands

apiman manager plugin [args...]
apiman manager org [args...]
apiman manager api [args...]
apiman manager gateway [args...]
apiman manager apply [args...]

--debug : Log at DEBUG level (default: false)
--help (-h) : Display usage only (default: false)
Expand All @@ -152,38 +158,38 @@ See the [shared-properties.yml](examples/declarative/shared-properties.yml) exam
admin123!)
--serverUsername (-su) VAL : Management API server username (default: apiman)
## Manage Organisations
### Manage Organisations

apiman org show [args...]
apiman org create [args...]
apiman manager org show [args...]
apiman manager org create [args...]

### Show Org
#### Show Org

apiman org show [args...]
apiman manager org show [args...]

--name (-n) VAL : Name

### Create Org
#### Create Org

apiman org create [args...]
apiman manager org create [args...]

--description (-d) VAL : Description
--name (-n) VAL : Name

## Manage Gateways
### Manage Gateways

apiman gateway test [args...]
apiman gateway show [args...]
apiman gateway create [args...]
apiman gateway list [args...]
apiman manager gateway test [args...]
apiman manager gateway show [args...]
apiman manager gateway create [args...]
apiman manager gateway list [args...]

### List Gateways
#### List Gateways

apiman gateway list [args...]
apiman manager gateway list [args...]

### Create Gateway
#### Create Gateway

apiman gateway create [args...]
apiman manager gateway create [args...]

--description (-d) VAL : Description
--endpoint (-e) VAL : Endpoint
Expand All @@ -192,15 +198,15 @@ See the [shared-properties.yml](examples/declarative/shared-properties.yml) exam
--type (-t) [REST | SOAP] : type (default: REST)
--username (-u) VAL : Username

### Show Gateway
#### Show Gateway

apiman gateway show [args...]
apiman manager gateway show [args...]

--name (-n) VAL : Name

### Test Gateway
#### Test Gateway

apiman gateway test [args...]
apiman manager gateway test [args...]

--description (-d) VAL : Description
--endpoint (-e) VAL : Endpoint
Expand All @@ -209,23 +215,23 @@ See the [shared-properties.yml](examples/declarative/shared-properties.yml) exam
--type (-t) [REST | SOAP] : type (default: REST)
--username (-u) VAL : Username

## Manage Plugins
### Manage Plugins

apiman plugin show [args...]
apiman plugin add [args...]
apiman plugin list [args...]
apiman manager plugin show [args...]
apiman manager plugin add [args...]
apiman manager plugin list [args...]

### Show Plugin
#### Show Plugin

apiman plugin show [args...]
apiman manager plugin show [args...]

--debug : Log at DEBUG level (default: false)
--help (-h) : Display usage only (default: false)
--id (-i) VAL : Plugin ID

### Add Plugin
#### Add Plugin

apiman plugin add [args...]
apiman manager plugin add [args...]

--artifactId (-a) VAL : Artifact ID
--classifier (-c) VAL : Classifier
Expand All @@ -234,17 +240,17 @@ See the [shared-properties.yml](examples/declarative/shared-properties.yml) exam

### List Plugins

apiman plugin list [args...]
apiman manager plugin list [args...]
## Manage APIs
### Manage APIs

apiman api create [args...]
apiman api list [args...]
apiman api publish [args...]
apiman manager api create [args...]
apiman manager api list [args...]
apiman manager api publish [args...]

### Create API
#### Create API

apiman api create [args...]
apiman manager api create [args...]

--endpoint (-e) VAL : Endpoint
--endpointType (-t) VAL : Endpoint type (default: rest)
Expand All @@ -256,31 +262,45 @@ See the [shared-properties.yml](examples/declarative/shared-properties.yml) exam
--serverVersion (-sv) [v11x | v12x] : Management API server version (default:
v11x)

### List APIs
#### List APIs

apiman api list [args...]
apiman manager api list [args...]

--orgName (-o) VAL : Organisation name
--serverVersion (-sv) [v11x | v12x] : Management API server version (default:
v11x)

### Publish API
#### Publish API

apiman api publish [args...]
apiman manager api publish [args...]

--version (-v) VAL : API version
--name (-n) VAL : API name
--orgName (-o) VAL : Organisation name
--serverVersion (-sv) [v11x | v12x] : Management API server version (default:
v11x)

## Apply declaration
### Apply declaration

apiman apply [args...]
apiman manager apply [args...]

--declarationFile (-f) PATH : Declaration file
-P VAL : Set property (key=value)

## Gateway commands

The following commands are available, when administering the Gateway directly:

apiman gateway generate: Generate configurations
apiman gateway apply: Apply Apiman Gateway declaration
apiman gateway org: List Organizations
apiman gateway api: Retire and list APIs
apiman gateway client: Retire and list Clients
apiman gateway status: View Gateway Status

--debug: Log at DEBUG level
--help, -h: Display usage only

# Recent changes and Roadmap

For recent changes see the [Changelog](CHANGELOG.md).
Expand Down
20 changes: 15 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

group 'io.apiman.cli'
version '0.2.4'
version '0.3.0'

buildscript {
repositories {
Expand All @@ -42,26 +42,28 @@ compileJava {
}

ext {
version_args4j = '2.33'
version_log4j = '2.5'
version_jcommander = '1.72'
version_log4j = '2.8.2'
version_guava = '19.0'
version_retrofit = '1.9.0'
version_jackson = '1.9.0'
version_jackson_yaml = '2.7.3'
version_modelmapper = '0.7.5'
version_commons_lang = '3.4'
version_guice = '4.0'
version_apiman = '1.3.1.Final'

// test dependencies
version_junit = '4.12'
version_ducttape = '1.0.5'
version_mockito = '1.10.19'
version_mockito = '2.8.47'
version_restassured = '2.9.0'
version_systemrules = '1.16.0'
version_hamcrest = '2.0.0.0'
}

dependencies {
compile "args4j:args4j:$version_args4j"
compile "com.beust:jcommander:$version_jcommander"
compile "org.apache.logging.log4j:log4j-core:$version_log4j"
compile "com.google.guava:guava:$version_guava"
compile "com.squareup.retrofit:retrofit:$version_retrofit"
Expand All @@ -70,6 +72,13 @@ dependencies {
compile "org.modelmapper:modelmapper:$version_modelmapper"
compile "org.apache.commons:commons-lang3:$version_commons_lang"
compile "com.google.inject:guice:$version_guice"

// apiman deps
compile "io.apiman:apiman-gateway-engine-beans:$version_apiman"
compile "io.apiman:apiman-common-plugin:$version_apiman"
compile "io.apiman:apiman-manager-api-core:$version_apiman"
runtime "io.apiman:apiman-distro-data:$version_apiman"
compile "io.apiman:apiman-gateway-api-rest:$version_apiman"

// route slf4j events to log4j2
compile "org.apache.logging.log4j:log4j-slf4j-impl:$version_log4j"
Expand All @@ -79,6 +88,7 @@ dependencies {
testCompile "org.mockito:mockito-core:$version_mockito"
testCompile "com.jayway.restassured:rest-assured:$version_restassured"
testCompile "com.github.stefanbirkner:system-rules:$version_systemrules"
testCompile "org.hamcrest:hamcrest-junit:$version_hamcrest"
}

jar {
Expand Down
Loading

0 comments on commit 75bc975

Please sign in to comment.