Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
*Update README
*Add issue template and pull request template
*Add logo
*Add Contributing doc
  • Loading branch information
VaskoBozhurski committed Oct 17, 2018
1 parent 9b026cc commit b3f33ec
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 26 deletions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Issue Template
about: MultiApps CF CLI Plugin issue template for bugs and feature requests

---

### Description
Describe your issue here. What is the expected behavior? What is the actual behavior?

### Your environment
* MultiApps Controller version - <!-- delete if not applicable -->
* MultiApps CF CLI Plugin version -
* which CF vendor is used -
* which backing services are used - <!-- e.g. database service / delete if not applicable -->

### Steps to reproduce
Tell us how to reproduce this issue.
Create [GIST(s)](https://gist.github.com/) with the command's output
Create [GIST(s)](https://gist.github.com/) which is copy of your deployment and extension descriptor and link here (if applicable)

### Additional information

If an multi-target app operation fails, download logs of the operation and provide them as a [GIST(s)](https://gist.github.com/). For more details, see *download-mta-op-logs / dmol* command provided by [CF MTA Plugin](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin). The most important log file is *MAIN_LOG*.
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to the MultiApps CF CLI Plugin

## Did you find a bug?
1. Check if the bug has already been reported and has an open [Issue](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/issues).

2. If there is none, create one by using the provided [Issue Template](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/issues/new/choose) for bugs.

3. Try to be as detailed as possible when describing the bug. Every bit of information helps!

## Do you have a question or need support?
If you need any support or have any questions regarding the project, you can drop us a message on [Slack](https://cloudfoundry.slack.com/?redir=%2Fmessages%2Fmultiapps-dev) or open an [Issue](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/issues) and we shall get back to you.

## Do you want to contribute to the code base?

### Fork the project
1. To develop your contribution to the project, first [fork](https://help.github.com/articles/fork-a-repo/) this repository in your own github account.

2. When developing make sure to keep your fork up to date with the origin's master branch or the release branch you want to contribute a fix to.

### How to build, develop and install?
1. To build a new version of the plugin follow the [Development](https://github.com/cloudfoundry-incubator//multiapps-cli-plugin#development) instructions.

2. If you have added new dependencies into the CF plugin make sure to update them as described in the [Adding Dependencies](https://github.com/cloudfoundry-incubator//multiapps-cli-plugin#adding-dependency-into-the-multiapps-cli-plugin).

3. To install the plugin follow the [Installation](https://github.com/cloudfoundry-incubator//multiapps-cli-plugin#installation) instructions.

### Testing
1. Running the tests is done with the [ginkgo](https://github.com/onsi/ginkgo) framework. Once you have it installed just execute `ginkgo -r` from the project's root directory and it will run all the tests.

2. If you are developing new functionality make sure to add tests covering the new scenarios where applicable!

3. The [spring-music](https://github.com/nvvalchev/spring-music) contains a handy sample MTA archive to test your MultiApps CF CLI Plugin against the MultiApps Controller.

### Formatting
Having the same style of formatting across the project helps a lot with readability. To format the project's source code run the following command from the root directory of the project:
```
gofmt -w cli clients commands testutil ui util
```

## Creating a pull request
When creating a pull request please use the provided template. Don't forget to link the [Issue](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/issues) if there is one related to your pull request!
10 changes: 10 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#### Description:
<!-- Why you are making this pull request
What the pull request changes
Any new design choices made
Areas to focus on for recommendations or to verify correct implementation
Any research you might have done -->


#### Issue: <!-- Link to a Github Issue, delete if not applicable -->

43 changes: 17 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# MultiApps CF CLI Plugin [![Build Status](https://travis-ci.org/cloudfoundry-incubator/multiapps-cli-plugin.svg?branch=master)](https://travis-ci.org/cloudfoundry-incubator/multiapps-cli-plugin)


# Description
<p align="center"><img width="335" height="281" src="logo.png" alt="MultiApps logo"></p>

This is a Cloud Foundry CLI plugin for performing operations on [multi-target applications (MTAs)](https://www.sap.com/documents/2016/06/e2f618e4-757c-0010-82c7-eda71af511fa.html) in Cloud Foundry, such as deploying, removing, viewing, etc. It is a client for the [CF MTA deploy service](https://github.com/SAP/cf-mta-deploy-service), which is an MTA deployer implementation for Cloud Foundry.
# MultiApps CF CLI Plugin [![Build Status](https://travis-ci.org/cloudfoundry-incubator/multiapps-cli-plugin.svg?branch=master)](https://travis-ci.org/cloudfoundry-incubator/multiapps-cli-plugin)
This is a Cloud Foundry CLI plugin (formerly known as CF MTA Plugin) for performing operations on [multi-target applications (MTAs)](https://www.sap.com/documents/2016/06/e2f618e4-757c-0010-82c7-eda71af511fa.html) in Cloud Foundry, such as deploying, removing, viewing, etc. It is a client for the [CF MultiApps Controller](https://github.com/cloudfoundry-incubator/multiapps-controller) (formerly known as CF MTA deploy-service), which is an MTA deployer implementation for Cloud Foundry.

# Requirements

- Installed CloudFoundry CLI - ensure that CloudFoundry CLI is installed and working. For more information about installation of CloudFoundry CLI, please visit the official CloudFoundry [documentation](https://docs.cloudfoundry.org/cf-cli/install-go-cli.html).
- Working [CF deploy-service](https://github.com/SAP/cf-mta-deploy-service) - this a CF plugin for the deploy-service application. Thus, a working deploy-service must be available on the CF landscape
- Working [CF MultiApps Controller](https://github.com/cloudfoundry-incubator/multiapps-controller) - this a CF plugin for the MultiApps Controller application. Thus, a working MultiApps Controller must be available on the CF landscape

# Download and Installation

## Download

The latest version of the plugin can be found in the table below. Select the plugin for your platform(Darwin, Linux, Windows) and download it.

Mac OS X 64 bit | Windows 64 bit | Linux 64 bit
Expand All @@ -22,19 +17,16 @@ Mac OS X 64 bit | Windows 64 bit | Linux 64 bit


## Installation

Install the plugin, using the following command:

```
cf install-plugin <path-to-the-downloaded-plugin> -f
cf install-plugin <path-to-the-plugin> -f
```
:rotating_light: Note: if you are running on an Unix-based system, you need to make the plugin executable before installing it. In order to achieve this, execute the following commad `chmod +x <path-to-the-downloaded-plugin>`
:rotating_light: Note: if you are running on an Unix-based system, you need to make the plugin executable before installing it. In order to achieve this, execute the following commad `chmod +x <path-to-the-plugin>`

:rotating_light: Check whether you have a previous version installed, using the command: `cf plugins`. If the MtaPlugin is already installed, you need to uninstall it first and then to install the new version. You can uninstall the plugin using command `cf uninstall-plugin MtaPlugin`.

## Usage

The CF MTA plugin supports the following commands:
The MultiApps CF plugin supports the following commands:

Command Name | Command Description
--- | ---
Expand All @@ -49,24 +41,23 @@ Command Name | Command Description

For more information, see the command help output available via `cf [command] --help` or `cf help [command]`.

Here is an example deployment of the open-sourced com.sap.openSAP.hana5.example:
Here is an example deployment of the open-sourced [spring-music](https://github.com/nvvalchev/spring-music):
```
$ git clone https://github.com/SAP/hana-shine-xsa.git
// build it TODO: verify that or provide another sample
$ cf deploy assembly/target/hana-shine-xsa.mtar
$ git clone https://github.com/nvvalchev/spring-music.git
$ cf deploy mta-assembly/spring-music.mtar -e config.mtaext
```

# Configuration
The configuration of the CF MTA plugin is done via env variables. The following are supported:
The configuration of the MultiApps CF plugin is done via env variables. The following are supported:
`DEBUG=1` - prints in standart output HTTP requests, which are from CLI client to CF deploy service backend.
`DEPLOY_SERVICE_URL=<deploy-service-app-url>` - thehe plugin attempts to deduce the deploy service URL based on the CF API URL. In case of issues, or if you want to target a deploy service instance different from the default one, you can configure the targeted deploy service URL via this env variable.

# How to obtain support
`DEPLOY_SERVICE_URL=<deploy-service-app-url>` - the plugin attempts to deduce the deploy service URL based on the CF API URL. In case of issues, or if you want to target a deploy service instance different from the default one, you can configure the targeted deploy service URL via this env variable.

If you need any support, have any question or have found a bug, please report it in the [GitHub bug tracking system](TODO: point to the github.com repostory issues). We shall get back to you.
# How to contribute
* [Did you find a bug?](CONTRIBUTING.md#did-you-find-a-bug)
* [Do you have a question or need support?](CONTRIBUTING.md#do-you-have-a-question-or-need-support)
* [How to develop, test and contribute to MultiApps CF Plugin](CONTRIBUTING.md#do-you-want-to-contribute-to-the-code-base)

# Development

## Building new release version
You can automatically build new release for all supported platforms by calling the build.sh script with the version of the build.
The version will be automatically included in the plugin, so it will be reported by `cf plugins`.
Expand All @@ -78,7 +69,7 @@ The version will be automatically included in the plugin, so it will be reported

This will produce `mta_plugin_linux_amd64`, `mta_plugin_darwin_amd64` and `mta_plugin_windows_amd64` in the repo's root directory.

## Adding dependency into the cf-mta-plugin
## Adding dependency into the multiapps-cli-plugin
#### If you want to add a dependecy which to be used later on during the build and development process, you need to follow these steps:
1. Make sure that you have godep installed(try to run `godep version`). If you do not have it, run the command: `go get github.com/tools/godep`. !!!IMPORTANT!!! Make sure that you are running on latest version of GO and godep!!!
2. Get the dependency by executing the command: `go get github.com/<package-full-name>` . If you want to update it use the -u option.
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b3f33ec

Please sign in to comment.