Skip to content
Snippets Groups Projects
Commit 2e69e9ab authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update readme

parent a80b64b6
No related branches found
No related tags found
No related merge requests found
File moved
# CI Package Server
A sattelite system of the CI server to delivery built packages in other
networks. The file access is protected with a dynamic authorization to
prevent public access.
An example client was coded in Bash (using curl)
SOURCE https://git-repo.iml.unibe.ch/iml-open-source/ci-pkg
## License
GNU GPL 3.0
## Requirements
* Webserver with xsentfile module
* Set filepath to [approot]/packages
* Rewrite rule for [ur]/packages/
## Installation on server
### Xsentfile module
On Apache Webserver install xentfile module.
i.e. on CentOS
yum install mod_xsendfile
### Configuration of vhost
In the Apache vhost for cipkg server set the XSendFilePath - it is an absolute
path on your websever.
Redirect all requests to /packages/[whatever] to /packages/index.php
Ecample snippet
```text
XSendFile On
XSendFilePath "/var/www/cipkg.example.com/packages/"
<Location "/packages">
<Location "/packages">
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</Location>
```
### Configuration of secret on server
if [approot]/public_html/ copy inc_config.php.dist to inc_config.php.dist.
set a secret behind key apikey.
```php
return array(
'apikey'=>'our-package-server-secret',
'cutfromrequest'=>'^/packages',
'packagedir'=>dirname(__DIR__).'/packages',
);
```
## Installation on client
On a target system you need a bash and curl.
Copy the files from [approot]/shellscripts/ somewhere in a project related
directory.
Copy getfile.sh.cfg.dist to getfile.sh.cfg and setup values:
```text
# ----------------------------------------------------------------------
# defaults
# ----------------------------------------------------------------------
IMLCI_PKG_SECRET=our-package-server-secret
IMLCI_URL=https://cipkg.example.com
IMLCI_PHASE=preview
IMLCI_PROJECT=myproject-id
IMLCI_FILE=
```
Remark: using the cfg file is optional. It countains default values.
all values can be set by command line parameters.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment