Add-in repository for Mono.Addins based applications
Cydin is an ASP.NET add-in repository web site for Mono.Addins based applications.
Add-in developers can publish their add-ins in a Cydin web site and make them available to all users. The site works like a build bot: it pulls the source code of add-ins from version control repositories, builds and packages them, and then publishes them in an add-in repository, to which MonoDevelop will be subscribed.
Cydin is composed by two services:
The Cydin web site is the frontend to the repository. It allows users to create new add-in projects and register add-in sources, and to download existing add-ins.
The Cydin build service is in charge of pulling the add-in source code, build the add-ins and publish them. This service can be installed in a different machine
The basic dependencies are:
Cydin also depends on some open source libraries which are included as binaries in the repository to make it easier to build the project. Those libraries are:
Open Cydin.sln in MonoDevelop and run the build command, or run xbuild in the root project directory.
The database script creation (create.sql) is available in the 'db' directory. To setup the database you have to:
If you want to use SQLite as a database backend instead, enable the CYDIN_ON_SQLITE define and uncomment the corresponding connectionString line in Web.Config. To import the initial schema, run 'sqlite3 -import ../db/create.sqlite sqlite.db' in Cydin directory.
To test the web site, start xsp2 in the Cydin directory, and then open localhost:8080 in your browser, or just click on Run in MonoDevelop. You'll have to follow some setup instructions the first time you access the web site.
The build service can run in the same server running the web site or in a different server. To set up the service:
Build the CydinService project.
Copy the following assemblies to the server: CydinService.exe CydinBuildService.dll ICSharpCode.SharpZipLib.dll Mono.Addins.dll Mono.Addins.Setup.dll
Create a configuration file for the service
You need to create a configuration file "cyding.config" with the following content:
Where 'web-site-url' is the url of the Cydin web site, and 'path-to-data-files' is an absolute or relative path to a directory where the service has to store the source code it downloads and builds. The DataPath element is optional and defaults to "Files".
Here is an example of configuration file:
The configuration file must be named cydin.config, and can be placed:
Start the service by running 'mono CydinService.exe'
Validate the build service connection. In the Cydin web site, go to the site administration page and click on the Build Service tab. Click on 'Change Service' and authorize the service connection when it shows up.
The build service can be sandboxed using AppArmor. This is a basic guide about how AppArmor can be configured to work with Cydin.
Enable AppSupport by setting the AppArmorSandbox property to 'true' in the cyding.config configuration file.
Create an AppArmor profile called 'cydin'. The AppArmor directory included in the cydin code contains a profile that can be used as a template. This template depends on a generic 'mono' profile also included in that directory.
Install the profile in /etc/apparmor.d. If you use the mono profile, install it in /etc/apparmor.d/abstractions.
Make sure apparmor is running by executing 'rcapparmor start'
Some projects may fail to build if they depend on tools which are not authorised in the cydin profile. Access violations detected by AppArmor are logged in /var/log/audit/audit.log. For logging to work, the packaged 'audit' and 'auditd' need to be installed.