diff --git a/docs/en/command-line-client.md b/docs/en/administration/command-line-client.md similarity index 100% rename from docs/en/command-line-client.md rename to docs/en/administration/command-line-client.md diff --git a/docs/en/administration/logging.md b/docs/en/administration/logging.md new file mode 100644 index 0000000000..fd371e3bf5 --- /dev/null +++ b/docs/en/administration/logging.md @@ -0,0 +1,17 @@ +--- +title: Logging +--- + +SCM-Manager logs information which can be useful, if the system does not behave as expected. +The logging behavior depends on your operating system and installation. + +| Type of Installation | Logging | +|----------------------|---------| +| Docker | stdout | +| RPM | /var/log/scm | +| DEB | /var/log/scm | +| Unix | $BASEDIR/logs | +| Mac OS X | ~/Library/Logs/SCM-Manager | +| Windows | $BASEDIR\logs | + +The location of the **$BASEDIR** can be found [here](basedirectory). diff --git a/docs/en/permission-concept.md b/docs/en/administration/permission-concept.md similarity index 100% rename from docs/en/permission-concept.md rename to docs/en/administration/permission-concept.md diff --git a/docs/en/scm-server-ssl.md b/docs/en/administration/scm-server-ssl.md similarity index 100% rename from docs/en/scm-server-ssl.md rename to docs/en/administration/scm-server-ssl.md diff --git a/docs/en/apache/apache-mod_jk.md b/docs/en/configuration/apache/apache-mod_jk.md similarity index 100% rename from docs/en/apache/apache-mod_jk.md rename to docs/en/configuration/apache/apache-mod_jk.md diff --git a/docs/en/apache/apache-mod_proxy.md b/docs/en/configuration/apache/apache-mod_proxy.md similarity index 100% rename from docs/en/apache/apache-mod_proxy.md rename to docs/en/configuration/apache/apache-mod_proxy.md diff --git a/docs/en/apache/config-mod_proxy.png b/docs/en/configuration/apache/config-mod_proxy.png similarity index 100% rename from docs/en/apache/config-mod_proxy.png rename to docs/en/configuration/apache/config-mod_proxy.png diff --git a/docs/en/basedirectory.md b/docs/en/configuration/basedirectory.md similarity index 100% rename from docs/en/basedirectory.md rename to docs/en/configuration/basedirectory.md diff --git a/docs/en/configuration/index.md b/docs/en/configuration/index.md new file mode 100644 index 0000000000..75a7d8f6cb --- /dev/null +++ b/docs/en/configuration/index.md @@ -0,0 +1,6 @@ +--- +title: Configuration +partiallyActive: true +--- + +* [Base Directory](basedirectory/) diff --git a/docs/en/logging.md b/docs/en/configuration/logging.md similarity index 56% rename from docs/en/logging.md rename to docs/en/configuration/logging.md index ae64f7bf51..8fa707f016 100644 --- a/docs/en/logging.md +++ b/docs/en/configuration/logging.md @@ -1,23 +1,3 @@ ---- -title: Logging ---- - -SCM-Manager logs information which can be useful, if the system does not behave as expected. -The logging behavior depends on your operating system and installation. - -| Type of Installation | Logging | -|----------------------|---------| -| Docker | stdout | -| RPM | /var/log/scm | -| DEB | /var/log/scm | -| Unix | $BASEDIR/logs | -| Mac OS X | ~/Library/Logs/SCM-Manager | -| Windows | $BASEDIR\logs | - -The location of the **$BASEDIR** can be found [here](basedirectory). - -## Configuration - The logging behaviour of SCM-Manager can be configured via an xml file. The syntax and properties can be found [here](http://logback.qos.ch/manual/configuration.html). The location of the file depends also on the type of installation. diff --git a/docs/en/build-from-source.md b/docs/en/development/build-from-source.md similarity index 100% rename from docs/en/build-from-source.md rename to docs/en/development/build-from-source.md diff --git a/docs/en/common-pitfall.md b/docs/en/development/common-pitfall.md similarity index 100% rename from docs/en/common-pitfall.md rename to docs/en/development/common-pitfall.md diff --git a/docs/en/definition-of-done.md b/docs/en/development/definition-of-done.md similarity index 100% rename from docs/en/definition-of-done.md rename to docs/en/development/definition-of-done.md diff --git a/docs/en/error-handling.md b/docs/en/development/error-handling.md similarity index 100% rename from docs/en/error-handling.md rename to docs/en/development/error-handling.md diff --git a/docs/en/intellij-idea-configuration.md b/docs/en/development/intellij-idea-configuration.md similarity index 100% rename from docs/en/intellij-idea-configuration.md rename to docs/en/development/intellij-idea-configuration.md diff --git a/docs/en/development/plugins/architecture.jpg b/docs/en/development/plugins/architecture.jpg new file mode 100644 index 0000000000..8fd77c73b4 Binary files /dev/null and b/docs/en/development/plugins/architecture.jpg differ diff --git a/docs/en/create-plugin.md b/docs/en/development/plugins/create-plugin.md similarity index 100% rename from docs/en/create-plugin.md rename to docs/en/development/plugins/create-plugin.md diff --git a/docs/en/development/plugins/create.md b/docs/en/development/plugins/create.md new file mode 100644 index 0000000000..f85b7a37dd --- /dev/null +++ b/docs/en/development/plugins/create.md @@ -0,0 +1,27 @@ +--- +title: Create a plugin +subtitle: Create a plugin from Maven Archetype +displayToc: true +--- + +# Requirements + +Be sure you have installed the following software: + +* [Java 8](https://java.com/de/download/) +* [Apache Maven](http://maven.apache.org/) + +# Create the plugin structure + +Use the scm-manager plugin [archetype](https://maven.apache.org/guides/introduction/introduction-to-archetypes.html) +to create the plugin structure. + +```bash +mvn archetype:... +``` + +Answer the questions of the archetype. + +# Implement your plugin + +... draw the rest of the owl diff --git a/docs/en/extension-points.md b/docs/en/development/plugins/extension-points.md similarity index 100% rename from docs/en/extension-points.md rename to docs/en/development/plugins/extension-points.md diff --git a/docs/en/development/plugins/how-to-create-a-plugin.md b/docs/en/development/plugins/how-to-create-a-plugin.md new file mode 100644 index 0000000000..158e71ac1f --- /dev/null +++ b/docs/en/development/plugins/how-to-create-a-plugin.md @@ -0,0 +1,41 @@ +--- +title: Plugin Creation +--- + +### Software Requirements + +- JDK 1.7 or higher + ([download](http://www.oracle.com/technetwork/java/index.html)) +- Maven 3 or higher ([download](http://maven.apache.org/)) + +### Create plugin + +```bash +mvn archetype:generate\ + -DarchetypeGroupId=sonia.scm.maven\ + -DarchetypeArtifactId=scm-plugin-archetype\ + -DarchetypeVersion=1.60\ + -DarchetypeRepository=http://maven.scm-manager.org/nexus/content/groups/public/ +``` +### Test the plugin + +```bash +mvn scmp:run +``` + +### Samples + +- [Hello World](https://bitbucket.org/sdorra/scm-manager/src/1.x/scm-samples/scm-sample-hello/) +- [Authentication Plugin](https://bitbucket.org/sdorra/scm-manager/src/1.x/scm-samples/scm-sample-auth/) + +### Further reading + +- [Injection framework - Google Guice](http://code.google.com/p/google-guice/) +- [Restful WebService - Jersey](http://jersey.java.net/nonav/documentation/latest/user-guide.html) +- [ XML transformation - JAXB](http://jaxb.java.net/guide/) +- [User interface - Ext JS](http://www.sencha.com/products/extjs3/) + +### Questions/Help + +If you have questions or you need help, please write to the mailing +list: diff --git a/docs/en/i18n-for-plugins.md b/docs/en/development/plugins/i18n-for-plugins.md similarity index 100% rename from docs/en/i18n-for-plugins.md rename to docs/en/development/plugins/i18n-for-plugins.md diff --git a/docs/en/development/plugins/i18n.md b/docs/en/development/plugins/i18n.md new file mode 100644 index 0000000000..6910f03174 --- /dev/null +++ b/docs/en/development/plugins/i18n.md @@ -0,0 +1,121 @@ +--- +title: I18n +subtitle: Howto do internationalization +displayToc: false +--- +SCM-Manager uses [react-i18next](https://react.i18next.com) for internationalization. +The keys for the translation are stored in json files called `plugins.json` at `src/main/resources/locales/`, +followed by a folder for each language (e.g.: en for English, de for German). +The keys should be prefixed with the name of the plugin to avoid collisions e.g.: + +`.../locales/en/plugins.json`: + +```json +{ + "scm-sample-plugin": { + "title": "Sample Title" + } +} +``` + +`.../locales/de/plugins.json`: + +```json +{ + "scm-sample-plugin": { + "title": "Beispiel Titel" + } +} +``` + +The translations keys can now be used with in the frontend. + +**Function Component**: + +```tsx +import React from "react"; +// import hook from react-i18next library +import { useTranslation } from "react-i18next"; + +const Title = () => { + // use hook to obtain translate function for the namespace plugins + const { t } = useTranslation("plugins"); + // use translate function to translate key scm-sample-plugin.title + return

{t("scm-sample-plugin.title")}

; +}; + +export default Title; +``` + +**Class Component**: + +```tsx +import React from "react"; +// import higher order component and types for out Props +import { WithTranslation, withTranslation } from "react-i18next"; + +// extend our props with WithTranslation +type Props = WithTranslation & {}; + +class Title extends React.Component { + + render() { + // get translate function from props + const { t } = this.props; + // use translate function to translate key scm-sample-plugin.title + return

{t("scm-sample-plugin.title")}

; + } + +}; + +// wrap our component with withTranslation for the namespace plugins +export default withTranslation("plugins")(Title); +``` + +If it is required to replace values in the content the `Trans` component can be used. +To achieve this goal we have to add placeholders to our translations e.g.: + +`.../locales/en/plugins.json`: + +```json +{ + "scm-sample-plugin": { + "title": "Sample Title", + "greetings": "<0/> at <1/>" + } +} +``` + +`.../locales/de/plugins.json`: + +```json +{ + "scm-sample-plugin": { + "title": "Beispiel Titel", + "greetings": "<0/> um <1/>" + } +} +``` + +Now we can use the `Trans` component, not we have to specified the namespace with in the key: + +```tsx + +``` + +We can also replace the placeholders with react components: + +```tsx +import {DateFromNow} from "@scm-manager/ui-components"; +... +"Bob"

, + + ]} +/> +``` diff --git a/docs/en/plugin-descriptor.md b/docs/en/development/plugins/plugin-descriptor.md similarity index 100% rename from docs/en/plugin-descriptor.md rename to docs/en/development/plugins/plugin-descriptor.md diff --git a/docs/en/plugin-development.md b/docs/en/development/plugins/plugin-development.md similarity index 100% rename from docs/en/plugin-development.md rename to docs/en/development/plugins/plugin-development.md diff --git a/docs/en/development/plugins/publish.md b/docs/en/development/plugins/publish.md new file mode 100644 index 0000000000..d0e3be4e0a --- /dev/null +++ b/docs/en/development/plugins/publish.md @@ -0,0 +1,42 @@ +--- +title: Publish +subtitle: Publish your Plugin +--- + +If you want to share your plugin with SCM-Manager users, you can publish it to the SCM-Manager Plugin Center by following the steps below. + +* Create a Mercurial or Git repository for your plugin +* Develop your plugin as described in [Create a plugin](/docs/create) +* Fork the [Plugin Center Repository](https://bitbucket.org/scm-manager/plugin-center) +* Create a folder with the name of your plugin under the `src/plugins` directory +* Put a `index.md` which starts with frontmatter metadata, which describes your plugin e.g.: + +```yaml +--- +name: scm-cas-plugin +displayName: CAS +description: CAS Authentication plugin for version 2.x of SCM-Manager +category: authentication +author: Cloudogu GmbH +--- +``` + +* Document your plugin with [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) below the frontmatter header +* Commit your work and open a pull request. Put the url to your plugin repository into the description of the pull request. + +After you have opened the pull request. +We will do a few steps to integrate your plugin into the plugin center: + +* We will create a fork of your plugin under the [SCM-Manager Team](https://bitbucket.org/scm-manager/) and give your account write permissions +* After that we will create a Jenkins job for your plugin on [oss.cloudogu.com](https://oss.cloudogu.com/jenkins/job/scm-manager/job/scm-manager-bitbucket/) +* At the end we will accept your pull request + +From now on you can work with the repository in the [SCM-Manager Team](https://bitbucket.org/scm-manager/). +Every time you release your plugin (push a tag to the repository) the Jenkins job will build your plugin and release it to the plugin center. + + +# Architecture + +The following picture shows the architecture of the involved systems. + +![Architecture](architecture.jpg "Plugin Center Architecture") diff --git a/docs/en/style-guide.md b/docs/en/development/plugins/style-guide.md similarity index 100% rename from docs/en/style-guide.md rename to docs/en/development/plugins/style-guide.md diff --git a/docs/en/ui-dod.md b/docs/en/development/ui-dod.md similarity index 100% rename from docs/en/ui-dod.md rename to docs/en/development/ui-dod.md diff --git a/docs/en/index.md b/docs/en/index.md index 9e478b6a47..aed87f6453 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -54,7 +54,7 @@ repositories over http. - [Style Guide](style-guide.md) - [Error Handling in REST, Java, UI](error-handling.md) - [Create a new Plugin](create-plugin.md) -- [Migration Wizard](migration-wizard.md) +- [Migration Wizard](content/docs/2.0.x/en/migrate-scm-manager-from-v1.md) - [Plugin Development](plugin-development.md) - [i18n for Plugins](i18n-for-plugins.md) - [Extension Points](extension-points.md) diff --git a/docs/en/installation/docker.md b/docs/en/installation/docker.md new file mode 100644 index 0000000000..75a64d46a2 --- /dev/null +++ b/docs/en/installation/docker.md @@ -0,0 +1,35 @@ +--- +title: Docker +subtitle: Install scm-manager with docker +displayToc: true +--- + +## Quickstart + +```text +docker run --name scm -p 8080:8080 -v scm-home:/var/lib/scm scmmanager/scm-manager:2.0.0-rc5 +``` + +## Persistence + +It is recommended to create a persistent volume for the scm-manager home directory. +This allows scm-manager updates and recreation of the container without lose of data. +The home directory is located at `/var/lib/scm`. +It is recommended to use a volume managed by docker. +If it is required to use a host directory, keep in mind that the scm-manager process is executed with a user which has the id 1000. +So ensure that the user with the uid 1000 can write to the directory e.g.: + +```text +mkdir /scm_home +chown 1000:1000 /scm_home +docker run --name scm -p 8080:8080 -v /scm_home:/var/lib/scm scmmanager/scm-manager:2.0.0-rc5 +``` + +## Exposed Ports + +SCM-Manager exposes its http port on port 8080. +If you want to use the ssh plugin, keep in mind that this plugin requires an extra port (default is 2222). + +```text +docker run --name scm -p 2222:2222 -p 8080:8080 -v scm-home:/var/lib/scm scmmanager/scm-manager:2.0.0-rc5 +``` diff --git a/docs/en/installation/index.md b/docs/en/installation/index.md new file mode 100644 index 0000000000..952c1bd178 --- /dev/null +++ b/docs/en/installation/index.md @@ -0,0 +1,13 @@ +--- +title: Installation +subtitle: Installation of scm-manager +partiallyActive: true +--- + +* [Docker](docker/) +* Kubernetes +* Debian based +* Red Hat based +* [Linux General](linux/) +* Mac OS X +* Windows diff --git a/docs/en/installation/linux.md b/docs/en/installation/linux.md new file mode 100644 index 0000000000..ced1276e7f --- /dev/null +++ b/docs/en/installation/linux.md @@ -0,0 +1,43 @@ +--- +title: Linux +subtitle: General linux installation +displayToc: true +--- +## Requirements + +Ensure that Java JRE is installed at least in version 8. +Recommended is Java 11. + +If you want to use [Mercurial](https://www.mercurial-scm.org/), ensure it is installed on your machine. + +## Installation + +Download [scm-server-2.0.0-rc5-app.tar.gz](https://maven.scm-manager.org/nexus/service/local/repositories/releases/content/sonia/scm/scm-server/2.0.0-rc5/scm-server-2.0.0-rc5-app.tar.gz) +and verify the checksum (sha1: 3b2dff3fda0c46362c518be37edd4e77bccc88bb). + +```bash +wget https://maven.scm-manager.org/nexus/service/local/repositories/releases/content/sonia/scm/scm-server/2.0.0-rc5/scm-server-2.0.0-rc5-app.tar.gz +echo "3b2dff3fda0c46362c518be37edd4e77bccc88bb *scm-server-2.0.0-rc5-app.tar.gz" | sha1sum -c - +``` + +Extract the archive: + +```bash +tar xvfz scm-server-2.0.0-rc5-app.tar.gz -C /opt +``` + +## Start + +The application can be started by using the scm-server script. + +```bash +/opt/scm-server/bin/scm-server +``` + +## Daemonize + +To start the application in background, we can use the `start` parameter. + +```bash +/opt/scm-server/bin/scm-server start +``` diff --git a/docs/en/nginx.md b/docs/en/installation/nginx.md similarity index 100% rename from docs/en/nginx.md rename to docs/en/installation/nginx.md diff --git a/docs/en/migration-wizard.md b/docs/en/migrate-scm-manager-from-v1.md similarity index 100% rename from docs/en/migration-wizard.md rename to docs/en/migrate-scm-manager-from-v1.md diff --git a/docs/en/navigation.yml b/docs/en/navigation.yml new file mode 100644 index 0000000000..6cdc83107a --- /dev/null +++ b/docs/en/navigation.yml @@ -0,0 +1,20 @@ +- section: Getting started + entries: + - /installation/ + - /configuration/ + - /migrate-scm-manager-from-v1/ + - /migrate-plugin-from-v1/ + - /faq/ + - /known-issues/ + +- section: Administration + entries: + - /administration/scm-server-ssl/ + - /administration/logging/ + - /administration/permission-concept/ + - /administration/command-line-client/ + +- section: Development + entries: + - /development/plugins + - /development/intellij-idea-configuration/