-
Notifications
You must be signed in to change notification settings - Fork 8
/
README
148 lines (107 loc) · 4.89 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
ABOUT CYDIN
===========
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
DEPENDENCIES
============
The basic dependencies are:
* Mono 2.6 (Install mono-complete or equivalent packages to get everything)
* Mysql (tested with 5.1.46)
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:
* Contracts.dll (http://code.google.com/p/mono-soc-2010)
* DotNetOpenAuth (http://github.com/slluis/dotnetopenid)
* ICSharpCode.SharpZipLib (get it from Mono)
* log4net (http://logging.apache.org/log4net)
* Mono.Addins (http://monoaddins.codeplex.com)
* mysql.data (http://www.mysql.com/downloads/connector/net)
* ASP.NET MVC 2.0 (get it from Mono)
BUILDING
========
Open Cydin.sln in MonoDevelop and run the build command, or run xbuild in
the root project directory.
DATABASE SETUP
==============
The database script creation (create.sql) is available in the 'db' directory.
To setup the database you have to:
1) Create a new database in mysql
2) run the create.sql script on that database
3) In Cydin/Web.config, look for 'CommunityAddinRepoConnectionString'. In the
connectionString attribute, set the address of the mysql server, the name
of the database, and the database user and password for the connection.
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.
RUNNING THE WEB SITE
====================
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.
BUILD SERVICE SETUP
===================
The build service can run in the same server running the web site or in a
different server. To set up the service:
1) Build the CydinService project.
2) Copy the following assemblies to the server:
CydinService.exe
CydinBuildService.dll
ICSharpCode.SharpZipLib.dll
Mono.Addins.dll
Mono.Addins.Setup.dll
3) Create a configuration file for the service
You need to create a configuration file "cyding.config" with the following
content:
<Settings>
<WebSiteUrl>web-site-url</WebSiteUrl>
<DataPath>path-to-data-files</DataPath>
</Settings>
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:
<Settings>
<WebSiteUrl>http://localhost:8080</WebSiteUrl>
<DataPath>Files</DataPath>
</Settings>
The configuration file must be named cydin.config, and can be placed:
* in the working directory from where the service is started
* in /etc
* in ~/.config
4) Start the service by running 'mono CydinService.exe'
5) 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.
APPARMOR SETUP
==============
The build service can be sandboxed using AppArmor. This is a basic guide
about how AppArmor can be configured to work with Cydin.
1) Enable AppSupport by setting the AppArmorSandbox property to 'true'
in the cyding.config configuration file.
2) 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.
3) Install the profile in /etc/apparmor.d. If you use the mono profile,
install it in /etc/apparmor.d/abstractions.
4) 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.