Skip to content

Commit

Permalink
Merge pull request #5 from Axway-API-Management-Plus/develop
Browse files Browse the repository at this point in the history
Prepare to release version 1.0.0
  • Loading branch information
Chris Wiechmann authored Jun 15, 2020
2 parents 8319579 + b8f31ed commit 95a51d7
Show file tree
Hide file tree
Showing 290 changed files with 5,998 additions and 5,259 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: Bug report
about: Create a report to help us improve Swagger-Promote
about: Create a report to help us to improve the API-Manager CLI
title: "[BUG]"
labels: bug
assignees: cwiechmann

---

**Swagger-Promote version**
> Please make sure to use the latest Swagger-Promote version.
**API-Mgr. CLI version**
> Please make sure to use the latest available version before reporting a bug.
**API-Manager and Service-Pack Version**

Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
name: Feature request
about: Tell us what you need and why in Swagger-Promote
about: Tell us what you need and why in the API-Mgr. CLI
title: "[Feature]"
labels: enhancement
assignees: cwiechmann

---

**User story**
>To integrate Swagger-Promote into our CI/CD pipeline we would like have
>Swagger-Promote available as a Maven-Module.


**Additional context**
>This would avoid to manage Swagger-Promote in a local repository.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: Question
about: Ask a question concerning Swagger-Promote
about: Ask a question concerning the CLI
title: "[Help]"
labels: help wanted
assignees: cwiechmann

---

**Swagger-Promote Version**
**API-Manager CLI Version**


**API-Manager and Service-Pack Version**
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Axway API-Management CLI Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.0.0] 2020-06-15
### Added
- Initial version of the APIM-CLI
- Swagger-Promote completely refactored
- Migrated API-Import & Export to dedicated modules
- New modules to manage applications (Import and Export)
- Get APIs and Applications (Filtered, different formats)
- Delete APIs (Front and Backend)
- Publish APIs
- Introduced API-Management programming interface
52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
# Axway API-Management CLI

This CLI tool allows you to control the Axway API management solution without access through the Web UI. You can call the CLI manually or integrate it into a CI/CD pipeline. The CLI is based on [Swagger-Promote](https://github.com/Axway-API-Management-Plus/apimanager-swagger-promote), which has been refactored to support more use-cases than only APIs.
This CLI allows you to control the Axway API management solution without access through the Web UI. You can call the CLI manually or integrate it into a CI/CD pipeline. The CLI is based on [Swagger-Promote](https://github.com/Axway-API-Management-Plus/apimanager-swagger-promote), which has been refactored to support more use-cases than only API-Import and -Export.

## Everything as code
The basic idea for the so-called "Everything as code" approach is that the desired state of something is declared in a configuration file which stored in your version management system. A tool is replicating that declared state to become the actual state. This is used for instance to manage a complex Cloud-Infrastructure called Infrastructure as code. You may read more here: https://hackernoon.com/everything-as-code-explained-0ibg32a3
The basic idea for the so-called "Everything as code" approach is that the desired state of something (API, Application, etc.) is declared in a configuration file which stored in your version management system. A tool, like this CLI, is then replicating that declared state to become the actual state in the target environment. This is used for instance to manage complex Cloud-Infrastructure called Infrastructure as code. You may read more here: https://hackernoon.com/everything-as-code-explained-0ibg32a3

This CLI is following the same approach for your APIs, Applications, etc. Everything is declared as code in a config file and stored in your version management system. The CLI transfers this desired state manually or automatically via a pipeline into the API management platform to become the actual state.
Additionally the CLI supports basic administrative commands for instance to display entities and perform simple tasks.
Additionally the CLI supports basic administrative commands for instance to list and filter entities and perform simple tasks. More will be added very soon.

Watch this video (28 min): https://youtu.be/2i8i1zMAMps to get an overview + demo.

With that, an API developer is just providing the desired state configuration of the API, Application. When checked in, the [CI/CD-Pipeline](https://github.com/Axway-API-Management-Plus/apim-cli/wiki/9.-Jenkins-Integration-with-GitHub-&-Bitbucket) picks it up and replicates it into the API Manager.
With that, an API developer or the operations team is just providing the desired state configuration of the API, Application. When checked in, the [CI/CD-Pipeline](https://github.com/Axway-API-Management-Plus/apim-cli/wiki/9.-Jenkins-Integration-with-GitHub-&-Bitbucket) picks it up and replicates it into the API Manager.

![API Manager Swagger-Promote overview](https://github.com/Axway-API-Management-Plus/apim-cli/blob/develop/misc/images/apimanager-swagger-promote-overview.png )

## Supported commands

### APIs
| Command | Comment |
| :--- | :--- |
|**import**|Replicates an API into the API-Manager |
|**export**|Exports one or more APIs from a running API-Manager |
The CLI is flexible and is extended with new functions via modules. These can be accessed and discovered via the CLI on the basis of groups and their commands.
To get an overview about the groups just call `apim`:
```
Available commands and options:
apim app - Manage your applications
apim api - Manage your APIs
```
To get for instance a `wide` list of APIs on the stage: `prod` execute the following command:
```
apim api get -s prod -wide
```
```
....
+--------------------------------------+-----------------+----------------+---------+---------------------+-------------+-------------+----------+----------------------+
| API-Id | Path | Name | Version | V-Host | State | Security | Policies | Organization |
+--------------------------------------+-----------------+----------------+---------+---------------------+-------------+-------------+----------+----------------------+
| 518b15c9-350c-47d8-9ad6-16ce02ef9dfe | /vhost-test-950 | VHost Test 950 | 1.0.0 | api123.customer.com | unpublished | passThrough | None | API Development 5538 |
| 39b7b2aa-7df8-44e0-b399-4e9d59dbad6d | /vhost-test-411 | VHost Test 411 | 1.0.0 | api123.customer.com | published | passThrough | None | API Development 5916 |
+--------------------------------------+-----------------+----------------+---------+---------------------+-------------+-------------+----------+----------------------+
......
```

To get a list of commands for each group call for instance `apim app`

### Applications
| Command | Comment |
| :--- | :--- |
|**import**|Replicates an application into the API-Manager |
|**export**|Exports one or more applications from a running API-Manager |
The CLI is flexible and more commands will be added. For an up-to-date list of the supported groups and commands, see the [documentation](https://github.com/Axway-API-Management-Plus/apim-cli/wiki#supported-commands).

## Quality assurance process
By using this CLI to control your Axway API management infrastructure it becomes a key component of your CI/CD process. Product quality is therefore very important so that you can be confident this CLI is doing what it's supposed to do.
Expand All @@ -38,8 +52,12 @@ The automated End-2-End test suite contains of __113__ different scenarios, whic
| Version | Branch | Status | Comment |
| :--- | :--- | :---: | :--- |
| 7.6.2 SP4 | develop | [![Build Status](https://travis-ci.org/Axway-API-Management-Plus/apim-cli.svg?branch=develop)](https://travis-ci.org/Axway-API-Management-Plus/apim-cli/branches)||
| 7.7.0 SP2 | test-with-7.7-SP2 | [![Build Status](https://travis-ci.org/Axway-API-Management-Plus/apim-cli.svg?branch=test-with-7.7-SP2)](https://travis-ci.org/Axway-API-Management-Plus/apim-cli/branches)||
| 7.7-20200130 | test-with-7.7-20200130 | [![Build Status](https://travis-ci.org/Axway-API-Management-Plus/apim-cli.svg?branch=test-with-7.7-20200130)](https://travis-ci.org/Axway-API-Management-Plus/apim-cli/branches)||
| 7.7-20200331 | test-with-7.7-20200331 | [![Build Status](https://travis-ci.org/Axway-API-Management-Plus/apim-cli.svg?branch=test-with-7.7-20200331)](https://travis-ci.org/Axway-API-Management-Plus/apim-cli/branches)||
| 7.7-2020053ß | test-with-7.7-20200530 | [![Build Status](https://travis-ci.org/Axway-API-Management-Plus/apim-cli.svg?branch=test-with-7.7-20200530)](https://travis-ci.org/Axway-API-Management-Plus/apim-cli/branches)||

Version 7.5.3 is NOT supported.
Version 7.5.3 is NOT supported. Version 7.6.2 SP3 is required.

## Get started

Expand All @@ -50,11 +68,15 @@ scripts\apim api import -c samples/basic/minimal-config-api-definition.json -s a
```
This command is reading the API-Management platform configuration details from the environment file: `env.api-env.properties` and replicates the given desired API state in the configuration file: `minimal-config-api-definition.json` into the API-Management platform.

Please see the [documentation](https://github.com/Axway-API-Management-Plus/apim-cli/wikis) for more information.

## Changelog
See [change log](CHANGELOG.md)

## Contributing

![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen)

Please read [Contributing.md](https://github.com/Axway-API-Management-Plus/Common/blob/master/Contributing.md) for details on our code of conduct, and the process for submitting pull requests to us.
Also please read this page on [how to contribute](https://github.com/Axway-API-Management-Plus/apimanager-swagger-promote/wiki/7.1-Contribute-to-this-project) to this project.

Expand Down
4 changes: 2 additions & 2 deletions distribution/assembly/dist-release.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-core</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-apim-adapter</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-api-import</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-api-export</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-app-import</include>
Expand Down Expand Up @@ -40,7 +40,7 @@
<directory>src/main/resources</directory>
<outputDirectory>/lib</outputDirectory>
<includes>
<include>log4j.xml</include>
<include>*.xml</include>
</includes>
</fileSet>
<fileSet>
Expand Down
8 changes: 3 additions & 5 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.github.axway-api-management-plus.apim-cli</groupId>
<artifactId>parent</artifactId>
<version>0.0.9-SNAPSHOT</version>
<version>1.0.0-RC2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -20,7 +18,7 @@
<dependencies>
<dependency>
<groupId>com.github.axway-api-management-plus.apim-cli</groupId>
<artifactId>apimcli-core</artifactId>
<artifactId>apimcli-apim-adapter</artifactId>
</dependency>
<dependency>
<groupId>com.github.axway-api-management-plus.apim-cli</groupId>
Expand Down
48 changes: 0 additions & 48 deletions modules/api-export/assembly/scripts/api-export.bat

This file was deleted.

31 changes: 0 additions & 31 deletions modules/api-export/assembly/scripts/api-export.sh

This file was deleted.

14 changes: 8 additions & 6 deletions modules/api-export/pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.github.axway-api-management-plus.apim-cli</groupId>
<artifactId>parent</artifactId>
<version>0.0.9-SNAPSHOT</version>
<version>1.0.0-RC2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -19,7 +17,7 @@
<dependencies>
<dependency>
<groupId>com.github.axway-api-management-plus.apim-cli</groupId>
<artifactId>apimcli-core</artifactId>
<artifactId>apimcli-apim-adapter</artifactId>
</dependency>
<dependency>
<groupId>com.github.axway-api-management-plus.apim-cli</groupId>
Expand All @@ -40,7 +38,7 @@
</dependency>
<dependency>
<groupId>com.github.axway-api-management-plus.apim-cli</groupId>
<artifactId>apimcli-core</artifactId>
<artifactId>apimcli-apim-adapter</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
Expand Down Expand Up @@ -105,5 +103,9 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>com.github.freva</groupId>
<artifactId>ascii-table</artifactId>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 95a51d7

Please sign in to comment.