The software team uses a cloud-server hosted at [http://www.digitalocean.com DigitalOcean]. The server runs Ubuntu 14.04 linux and has 512MB RAM and 20GB storage.[[BR]] The server name is jupiter2.raidtech.net and the static IP is 104.236.89.124. The domain name wiki.raidtech.net takes you to the same server and is directed to the Wiki virtual host. So users can access the server here: * ssh://jupiter2.raidtech.net * https://jupiter2.raidtech.net:20000 * http://wiki.raidtech.net/login Administration can be performed by command line (SSH) or via [https://jupiter2.raidtech.net:10000 Webmin][[BR]] == User Management === Adding a new student: * [http://wiki.raidtech.net/admin/accounts/users Add trac user] * [http://wiki.raidtech.net/admin/general/perm Add user to appropriate group] (e.g. swdev) to give them the appropriate access permissions In addition, for students on the software team, you should also create a unix user account and add them to the swdev group; this gives them permission to access the software repositories * [https://jupiter2.raidtech.net:10000 Add unix user] (System->Users and Groups] You can also do these from the unix command line: {{{ sudo adduser sudo usermod -a -G swdev cd /var/local/trac sudo htpasswd .htpasswd sudo trac-admin /var/local/trac permission add swdev }}} === Adding a new mentor: You can add a mentor using the web interfaces as described above for students. Note that mentors should be added to both the appropriate student and mentor groups (e.g. swdev and swmentors) to ensure they have full permissions. You can do this from the command line as well: {{{ sudo adduser sudo usermod -a -G swmentors sudo usermod -a -G swdev sudo usermod -a -G sudo cd /var/local/trac sudo htpasswd .htpasswd sudo trac-admin /var/local/trac permission add cfgmgmt }}} == Version Control Subversion is used for version control; the repositories are stored in /home/svn. Repositories are accessed securely from subversion clients (such as !NetBeans) using the URL: * svn+ssh://jupiter2.raidtech.net/home/svn/ Separate repositories are used for each sub-team that does not need to share code with other sub-teams (e.g. gameapp, sensors, etc.). Experiments should be done using the test repository. === Creating a repository: {{{ sudo svnadmin create /home/svn/myrepo sudo chown -R root:swdev /home/svn/myrepo/db sudo chmod -R g+w /home/svn/myrepo/db sudo chown -R root:swdev /home/svn/myrepo/locks sudo chmod -R g+w /home/svn/myrepo/locks }}} After creating a repository, add it to Trac using the [http://wiki.raidtech.net/admin/versioncontrol/repository web interface]. If there is data in the repository already, you may need to execute the following command: {{{ sudo trac-admin /var/local/trac repository resync "myrepo" }}} You may also need to add a post-commit hook in the repository to call: {{{ trac-admin /var/local/trac changeset added "myrepo" $REV }}} For more information see: http://svnbook.red-bean.com/en/1.7/svn.reposadmin.create.html === Adding a project To create a project within a repository using the command line, on your local computer: * create project dir myproj w/sub-dirs: tags, branches, trunk * create/copy your project under myproj/trunk (see example helloc project in test repository) * cd myproj * svn import !svn+ssh://jupiter2.raidtech.net/ -m "initial import" You can also usually create projects using the subversion client in your IDE. == Web Server An [https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu Apache LAMP] webserver is installed and is used by the Trac Wiki. Other [https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts virtual web servers] can be added. The default web page is located [http://jupiter2.raidtech.net here]. Important directories for configuration are: * /etc/apache2 (the Apache configuration files) * /var/www/html (the default web page directory) == Trac Wiki and Defect Tracking [http://trac.edgewall.org/wiki/TracGuide Trac] provides a host of features including trouble ticketing, a software repository browser, and a general-purpose wiki. The plugins [http://trac-hacks.org/wiki/PermRedirectPlugin PermRedirect] and [http://trac-hacks.org/wiki/AccountManagerPlugin AccountManager] are installed for additional features. === Configuration Important directories/files for configuration include: * /var/local/trac * /var/local/trac/conf/trac.ini Note that a symbolic link should be created in each of the trac sub-directories back to the VERSION file to avoid an annoying error message: {{{ ln -s /var/local/trac/VERSION conf/VERSION ln -s /var/local/trac/VERSION db/VERSION ln -s /var/local/trac/VERSION htdocs/VERSION ln -s /var/local/trac/VERSION log/VERSION ln -s /var/local/trac/VERSION plugins/VERSION ln -s /var/local/trac/VERSION templates/VERSION }}} === Changing team logo '''Trac.ini''' (mentioned previously) contains a section which describes how the logo of the website is displayed. Specifically: {{{ [header_logo] alt = RAID 2537 - Software Development #The alt text for the logo height = 100 #The logo's height in pixels link = #An optional link to go to if the logo is clicked src = site/RAIDLogo.jpg #The location of the image width = 80 #The logo's width in pixels }}} Descriptions of these properties are listed in the code above. A few things to remember about all this: * When placing the logo into the filesystem, anything listed as being in the "site" file is actually listed under /var/local/trac/htdocs * The "alt text" mentioned above is just some text that is shown when someone hovers their mouse over the logo === Moving a logo onto the server In order to get a logo onto the server, you will have to use the linux command {{{scp}}} (if you're using linux or mac) or a SCP windows client, [[http://winscp.net/eng/download.php|WinSCP]] being a notable one for its PuTTY integration. The syntax for the SCP command will be {{{ scp @jupiter2.raidtech.net:/home// }}} After moving the file to your local account, you will have to {{{mv}}} the file into '''/var/local/trac/htdocs'''. After doing, this, you should change the permissions on the file. {{{ sudo chown root:www-data sudo chmod a=r }}} Make sure you update the file name of your image in '''trac.ini''' after adding the image to the server, and if you need to delete the old one remember to use {{{rm}}} to delete the old file.