Line 1: |
Line 1: |
| This article is about using a bare SME Server as a development server for SME Server packages or contributed packages. | | This article is about using a bare SME Server as a development server for SME Server packages or contributed packages. |
| | | |
| + | This article is only about setting up your smeserve build server. To use it, you should follow one of the other articles (e.g. [[Simple Package Modification]]) |
| | | |
| + | ==== The Server ==== |
| This is what I did after reading a number of older wiki articles re: developing and amending packages as well as development environment setup. | | This is what I did after reading a number of older wiki articles re: developing and amending packages as well as development environment setup. |
− |
| |
| | | |
| I started with a standard SME Server 10.x install (as a VM) | | I started with a standard SME Server 10.x install (as a VM) |
Line 24: |
Line 25: |
| * add a developer user | | * add a developer user |
| | | |
− | Now we ssh into our server as root, to finish setting up our developer user:<syntaxhighlight lang="bash"> | + | Now we ssh into our server as root, to finish setting up our developer user: |
| + | <syntaxhighlight lang="bash"> |
| db accounts setprop <userid> Shell /bin/bash | | db accounts setprop <userid> Shell /bin/bash |
| chsh -s /bin/bash <userid> | | chsh -s /bin/bash <userid> |
Line 32: |
Line 34: |
| yum --enablerepo=smedev,epel,extras install plague-client mock python-ctypes glances e-smith-devtools smeserver-mock | | yum --enablerepo=smedev,epel,extras install plague-client mock python-ctypes glances e-smith-devtools smeserver-mock |
| signal-event post-upgrade; signal-event reboot | | signal-event post-upgrade; signal-event reboot |
− | </syntaxhighlight>Now you need to login as your developer and set them up with all the right access<syntaxhighlight lang="bash"> | + | </syntaxhighlight> |
− | # add key stuff
| + | Now you need to login as your developer and set them up: |
| | | |
− | cat <<_EOT > ~/.ssh/config
| + | You will need to tweak their shell for CVS access and whilst there, why not make it a little friendlier :) |
− | Host shell.koozali.org koozalishell
| + | <syntaxhighlight lang="bash"> |
− | Hostname shell.koozali.org
| |
− | User <userid>
| |
− | IdentityFile ~/.ssh/<my_id_file>
| |
− | ForwardAgent yes
| |
− | Port 222
| |
− | | |
− | Host buildsys
| |
− | Hostname buildsys.koozali.org
| |
− | User <userid>
| |
− | IdentityFile ~/.ssh/<my_id_file>
| |
− | ForwardAgent yes
| |
− | Port 222
| |
− | _EOT
| |
− | | |
− | # add .buildsys stuff
| |
− | </syntaxhighlight>and create their working directories<syntaxhighlight lang="bash">
| |
− | mkdir -p ~/{smeserver,smecontribs}
| |
− | </syntaxhighlight>You will need to tweak their shell for CVS access and whilst there why not make it a little friendlier :)<syntaxhighlight lang="bash">
| |
| cat <<_EOT > ~/.bashrc | | cat <<_EOT > ~/.bashrc |
| # .bashrc | | # .bashrc |
Line 88: |
Line 72: |
| _EOT | | _EOT |
| </syntaxhighlight>You will have to log out and back in for this to take effect. | | </syntaxhighlight>You will have to log out and back in for this to take effect. |
| + | |
| + | Create their working directories<syntaxhighlight lang="bash"> |
| + | mkdir -p ~/{smeserver,smecontribs} |
| + | </syntaxhighlight> |
| + | |
| + | ==== Developer access==== |
| + | You don't need to have developer access to copy out source, local compiles, etc., but you do need it if you are going to want to save changes back into cvs or git. |
| + | *SME Server code is stored in the CVS on [[/shell.koozali.org/|http://shell.koozali.org]] and in the future in git on https://src.koozali.org. To be able to work on your code in the SME Server CVS repository you need an account on Koozali.org. With this account the development team can give you access to the CVS repository. |
| + | |
| + | * After your Koozali.org account has been created you can ask the development team to give you developer access to smecontribs. Create a bug in the Bug Tracker as usual. |
| + | *You will be sent your shell keys (store in ~/.ssh/) and plague keys (store in ~/.buildsys/) |
| + | |
| + | When they have koozali shell and buildsys access, you'll need to set up their configs |
| + | |
| + | =====For shell.koozali.org (cvs) ===== |
| + | <syntaxhighlight lang="bash"> |
| + | nano ~/.ssh/config |
| + | |
| + | Host shell.koozali.org koozalishell |
| + | Hostname shell.koozali.org |
| + | User <userid> |
| + | IdentityFile ~/.ssh/<my_id_file> |
| + | ForwardAgent yes |
| + | Port 222 |
| + | |
| + | Host buildsys |
| + | Hostname buildsys.koozali.org |
| + | User <userid> |
| + | IdentityFile ~/.ssh/<my_id_file> |
| + | ForwardAgent yes |
| + | Port 222 |
| + | |
| + | </syntaxhighlight>If you didn't have an existing ~/.ssh/config file you may need to change the permissions<syntaxhighlight lang="bash"> |
| + | chmod 0600 ~/.ssh/config |
| + | </syntaxhighlight> |
| + | |
| + | =====For buildsys===== |
| + | <syntaxhighlight lang="bash"> |
| + | nano ~/.plague-client.cfg |
| + | |
| + | [Certs] |
| + | user-cert = ~/.buildsys/plague-cert.pem |
| + | user-ca-cert = ~/.buildsys/ca-koozali.org.pem |
| + | server-ca-cert = ~/.buildsys/ca-koozali.org.pem |
| + | |
| + | [Server] |
| + | use_ssl = yes |
| + | address = https://buildsys.koozali.org:8887 |
| + | allow_uploads = yes |
| + | upload_user = <your koozali user id> |
| + | |
| + | [User] |
| + | email = <your email address> |
| + | |
| + | </syntaxhighlight>You should check that the keys have the correct permissions or change them<syntaxhighlight lang="bash"> |
| + | chmod 0600 ~/.buildsys/* |
| + | </syntaxhighlight> |
| + | |
| + | |
| + | You will have to log out and back in for this to take effect. |
| + | |
| + | |
| + | To check that plague is working |
| + | plague-client list_builders |
| + | |
| + | Builders: |
| + | ------------------------------------------------------------------------------------------ |
| + | build64-1.contribs.org x86_64 amd64 ia32e noarch i386 i486 i586 i686 athlon available |
| + | build32-1.contribs.org i386 i486 i586 i686 athlon noarch available |
| + | |
| + | ===== For src.koozali.org (git)===== |
| + | |
| + | |
| [[Category:Developer]] | | [[Category:Developer]] |