Difference between revisions of "Provider Portal/Apps"

From Univention Wiki

Jump to: navigation, search
Line 3: Line 3:
 
After all that reading, you want to get your App into App Center? Great!
 
After all that reading, you want to get your App into App Center? Great!
  
= Univention Self Service =
+
= Univention Self Service module =
  
 
We have a service where you can upload your App into the Test App Center (Univention Self Service). This is something like a beta channel where you can test your App before users can see it and install it in their production environments.
 
We have a service where you can upload your App into the Test App Center (Univention Self Service). This is something like a beta channel where you can test your App before users can see it and install it in their production environments.
Line 10: Line 10:
 
log in to: [https://apps.software-univention.de/univention-management-console/#module=appcenter-selfservice::0:].
 
log in to: [https://apps.software-univention.de/univention-management-console/#module=appcenter-selfservice::0:].
  
All your Apps are listed in the module. You can also create a new App. Clicking on an App will reveal all available versions across all UCS versions.
+
All your Apps across all UCS versions are listed in the module. You can also create a new App. Left clicking on an App will let you edit all options concerning your App, including logos, packages. Attributes of the ini file are put into a clear form. Right clicking will open a context menu with further options like editing an older version or adding a new version.
  
 
[[File:appcenter-self-service-add-app.png|thumb|Adding a first App to the Self Service]]
 
[[File:appcenter-self-service-add-app.png|thumb|Adding a first App to the Self Service]]
  
 
;''Note'': In fact, not across all UCS versions. This module only supports UCS 4.1 and higher; Apps for older releases are not managed.
 
;''Note'': In fact, not across all UCS versions. This module only supports UCS 4.1 and higher; Apps for older releases are not managed.
 
Clicking on one version will open the settings for this particular App version. You may upload ini files, packages, logos, etc.
 
  
 
[[File:appcenter-self-service-upload.png|thumb|Self Service interface for uploading files. Possible actions on the left]]
 
[[File:appcenter-self-service-upload.png|thumb|Self Service interface for uploading files. Possible actions on the left]]
  
After you changed something, you can publish this App in the Test App Center. This is done without any interaction from Univention. You may install and test your App immediately.
+
After editing the App version, you can save your changes directly on the Test App Center. This is done without any interaction from Univention. You may install and test your App immediately.
  
 
To actually install the App from the Test App Center, you need a running UCS (see [[Testing]]). You also need to activate the Test App Center and deactivate some security features (packages from the Test App Center are not signed by Univention!). Use
 
To actually install the App from the Test App Center, you need a running UCS (see [[Testing]]). You also need to activate the Test App Center and deactivate some security features (packages from the Test App Center are not signed by Univention!). Use
Line 31: Line 29:
 
;''Note'': If you feel the module is not powerful enough, you can send feedback to appcenter@univention.de.
 
;''Note'': If you feel the module is not powerful enough, you can send feedback to appcenter@univention.de.
  
== Controlling the Self Service from the command line ==
+
= Controlling the Self Service from the command line =
  
 
The module can be used by calling a script. This is great for integrating Univention Self Service into your build chain.
 
The module can be used by calling a script. This is great for integrating Univention Self Service into your build chain.
Line 38: Line 36:
  
 
[[File:appcenter-self-service-preview.png|thumb|Self Service preview buttons below an App version]]
 
[[File:appcenter-self-service-preview.png|thumb|Self Service preview buttons below an App version]]
 +
 +
== Prerequisites ==
 +
 +
You need to download the latest version of the upload script here: https://apps.software-univention.de/appcenter-selfservice/univention-appcenter-selfservice
 +
 +
The script needs:
 +
* Python 2.7 (https://www.python.org/downloads/)
 +
* cURL (https://curl.haxx.se/download.html)
 +
 +
The script can then be used to control the Self Service module. On Linux, type:
 +
 +
<pre>
 +
curl https://apps.software-univention.de/appcenter-selfservice/univention-appcenter-selfservice ~/univention-appcenter-selfservice
 +
chmod +x ~/univention-appcenter-selfservice
 +
~/univention-appcenter-selfservice --help
 +
~/univention-appcenter-selfservice list
 +
</pre>
 +
 +
== Commands ==
 +
 +
The script has several subcommands. Some actions are only supported in the web module (e.g., creating a completely new App, deleting one App version).
 +
 +
;list: Lists all Apps.
 +
;status: Fetches the current status of an App. It lists all versions along with basic information of whether the App is in the App Center and if there is a difference between the App in the Test App Center and the real App Center.
 +
;new-version: Add a new version for an existing App. Initially, the new version is an exact copy of the old App version (same ini file with reference to the same logos, same packages - well, except for '''Version''' in the ini file). You may edit the version afterwards. Either by the web module, or by the '''upload''' command. You can specify the "source app version" as well as the new version: ./univention-appcenter-selfservice list new-version 4.1/myapp=1.0 4.1/myapp=2.0. If you do not specify a second argument, the version will be set to that of the source version plus an additional "ucs-1" qualifier.
 +
;upload: Uploads files to Univention App Center Self Service. These files replace the old files. You can upload [[Meta files/ini|ini files]], [[Meta files|logos]], READMEs, [[Docker Apps/Package Based|packages]] and [[Docker Apps/Files|other files]]. The filenames have to match the filename on the App Center server, e.g., a README_UPDATE_DE file has to be named ''README_UPDATE_DE'', an ini file needs to be named like ''myapp.ini''. Logos, thumbnails have to be named after a filename specified in the ini file. For packages, any other package version than the one you just uploaded is deleted. This keeps the repository cleam, you can add '''--dont-clear''' to avoid this. You may also upload an archive. In this case, it needs to end with ''.tgz'' or ''.tar.gz''. Technically, every file is extracted and used separately, so you could also just upload every single file instead of the archive.
 +
 +
;''Warning'': Uploading an ini file is discouraged. If Univention changed something on your ini file (new attributes introduced some time ago or typos), these changes are overwritten. Normally you do not need to change anything in your ini file other than the version. And the version is changed automatically by '''new-version'''.
 +
 +
== Credentials ==
 +
 +
All subcommands take additionally '''--username''' and '''--passwdfile''' (a file containing nothing but the password, not even the a newline). This can be used for noninteractive scripts. However, it is even possible to create two files, ''~/univention-appcenter-user'' and ''~/univention-appcenter-pwd''. These container nothing but the username / password. And they are used so that you do not have to type your credentials every time you use the script.
 +
 +
== Examples ==
 +
 +
<pre>
 +
~/univention-appcenter-selfservice new-version 4.1/myapp  # => creates a new version based on the latest version of myapp. Version=${old_version} ucs-1.
 +
~/univention-appcenter-selfservice new-version 4.1/myapp=1.0 4.1/myapp=2.0  # => creates a new version (2.0) based on the version 1.0 of myapp. UCS Version is 4.1
 +
~/univention-appcenter-selfservice new-version 4.1/myapp=1.0 4.2/myapp=1.0  # => copies myapp Version 1.0 from UCS 4.1 to UCS 4.2. Note: Currently, only 4.2 is not supported.
 +
 +
~/univention-appcenter-selfservice upload 4.1/myapp README* #  uploads all README files in the current folder to the latest version myapp in UCS 4.1
 +
~/univention-appcenter-selfservice upload 4.1/myapp myapp-server.deb  # uploads myapp.deb. Any other myapp-server package will be deleted (0.9, 2.0, ...). On the server, it will be named like myapp-server_1.0.0_all.deb.
 +
~/univention-appcenter-selfservice upload 4.1/myapp=1.0 myapp.svg  # uploads an image. Will be rejected if this image is not specified somewhere in the ini file. Warning (/ Feature): This may overwrite the logo for other version using the same logo name, too.
 +
~/univention-appcenter-selfservice upload 4.1/myapp app.tar.gz  # uploads an archive. All files in this archive will be used. The folder structure does not matter.
 +
</pre>

Revision as of 14:44, 21 November 2016


After all that reading, you want to get your App into App Center? Great!

Univention Self Service module

We have a service where you can upload your App into the Test App Center (Univention Self Service). This is something like a beta channel where you can test your App before users can see it and install it in their production environments.

To get an account, just send an e-mail to <appcenter@univention.de> and tell us your name, e-mail, organization. We will create an account for you. Your account's password is chosen by you. Just go to [1]. After that, you can log in to: [2].

All your Apps across all UCS versions are listed in the module. You can also create a new App. Left clicking on an App will let you edit all options concerning your App, including logos, packages. Attributes of the ini file are put into a clear form. Right clicking will open a context menu with further options like editing an older version or adding a new version.

Adding a first App to the Self Service
Note
In fact, not across all UCS versions. This module only supports UCS 4.1 and higher; Apps for older releases are not managed.
Self Service interface for uploading files. Possible actions on the left

After editing the App version, you can save your changes directly on the Test App Center. This is done without any interaction from Univention. You may install and test your App immediately.

To actually install the App from the Test App Center, you need a running UCS (see Testing). You also need to activate the Test App Center and deactivate some security features (packages from the Test App Center are not signed by Univention!). Use

univention-install univention-appcenter-dev;
univention-app dev-use-test-appcenter

for this.

Note
If you feel the module is not powerful enough, you can send feedback to appcenter@univention.de.

Controlling the Self Service from the command line

The module can be used by calling a script. This is great for integrating Univention Self Service into your build chain.

One advantage of using the module is that it gives you easy access to the App as it would look like in the App Center. As good presentation is key to the success of an App, you should still use the module from time to time.

Self Service preview buttons below an App version

Prerequisites

You need to download the latest version of the upload script here: https://apps.software-univention.de/appcenter-selfservice/univention-appcenter-selfservice

The script needs:

The script can then be used to control the Self Service module. On Linux, type:

curl https://apps.software-univention.de/appcenter-selfservice/univention-appcenter-selfservice ~/univention-appcenter-selfservice
chmod +x ~/univention-appcenter-selfservice
~/univention-appcenter-selfservice --help
~/univention-appcenter-selfservice list

Commands

The script has several subcommands. Some actions are only supported in the web module (e.g., creating a completely new App, deleting one App version).

list
Lists all Apps.
status
Fetches the current status of an App. It lists all versions along with basic information of whether the App is in the App Center and if there is a difference between the App in the Test App Center and the real App Center.
new-version
Add a new version for an existing App. Initially, the new version is an exact copy of the old App version (same ini file with reference to the same logos, same packages - well, except for Version in the ini file). You may edit the version afterwards. Either by the web module, or by the upload command. You can specify the "source app version" as well as the new version: ./univention-appcenter-selfservice list new-version 4.1/myapp=1.0 4.1/myapp=2.0. If you do not specify a second argument, the version will be set to that of the source version plus an additional "ucs-1" qualifier.
upload
Uploads files to Univention App Center Self Service. These files replace the old files. You can upload ini files, logos, READMEs, packages and other files. The filenames have to match the filename on the App Center server, e.g., a README_UPDATE_DE file has to be named README_UPDATE_DE, an ini file needs to be named like myapp.ini. Logos, thumbnails have to be named after a filename specified in the ini file. For packages, any other package version than the one you just uploaded is deleted. This keeps the repository cleam, you can add --dont-clear to avoid this. You may also upload an archive. In this case, it needs to end with .tgz or .tar.gz. Technically, every file is extracted and used separately, so you could also just upload every single file instead of the archive.
Warning
Uploading an ini file is discouraged. If Univention changed something on your ini file (new attributes introduced some time ago or typos), these changes are overwritten. Normally you do not need to change anything in your ini file other than the version. And the version is changed automatically by new-version.

Credentials

All subcommands take additionally --username and --passwdfile (a file containing nothing but the password, not even the a newline). This can be used for noninteractive scripts. However, it is even possible to create two files, ~/univention-appcenter-user and ~/univention-appcenter-pwd. These container nothing but the username / password. And they are used so that you do not have to type your credentials every time you use the script.

Examples

~/univention-appcenter-selfservice new-version 4.1/myapp  # => creates a new version based on the latest version of myapp. Version=${old_version} ucs-1.
~/univention-appcenter-selfservice new-version 4.1/myapp=1.0 4.1/myapp=2.0  # => creates a new version (2.0) based on the version 1.0 of myapp. UCS Version is 4.1
~/univention-appcenter-selfservice new-version 4.1/myapp=1.0 4.2/myapp=1.0  # => copies myapp Version 1.0 from UCS 4.1 to UCS 4.2. Note: Currently, only 4.2 is not supported.

~/univention-appcenter-selfservice upload 4.1/myapp README* #  uploads all README files in the current folder to the latest version myapp in UCS 4.1
~/univention-appcenter-selfservice upload 4.1/myapp myapp-server.deb  # uploads myapp.deb. Any other myapp-server package will be deleted (0.9, 2.0, ...). On the server, it will be named like myapp-server_1.0.0_all.deb.
~/univention-appcenter-selfservice upload 4.1/myapp=1.0 myapp.svg  # uploads an image. Will be rejected if this image is not specified somewhere in the ini file. Warning (/ Feature): This may overwrite the logo for other version using the same logo name, too.
~/univention-appcenter-selfservice upload 4.1/myapp app.tar.gz  # uploads an archive. All files in this archive will be used. The folder structure does not matter.
Personal tools