wiki:SystemAdministration

Version 9 (modified by David Albert, 10 years ago) (diff)

--

The software team uses a cloud-server hosted at DigitalOcean. The server runs Ubuntu 14.04 linux and has 512MB RAM and 20GB storage.

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:

Administration can be performed by command line (SSH) or via Webmin

User Management

Adding a new student:

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

You can also do these from the unix command line:

        sudo adduser <username>
        sudo usermod -a -G swdev <username>
        cd /var/local/trac
        sudo htpasswd .htpasswd <username>
        sudo trac-admin /var/local/trac permission add <username> 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 <username>
        sudo usermod -a -G swmentors <username>
        sudo usermod -a -G swdev <username>
        sudo usermod -a -G sudo <username>
        cd /var/local/trac
        sudo htpasswd .htpasswd <username>
        sudo trac-admin /var/local/trac permission add <username> 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:

Separate repositories are used for each sub-team that does not need to share code with other sub-teams (e.g. gameapp, sensors, etc.)[BR]

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 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/<repositoryname> -m "initial import"

You can also usually create projects using the subversion client in your IDE.

Web Server

An apache webserver is installed and is used by the Trac Wiki. Other virtual web servers can be added. The default web page is located here. Important directories for configuration are:

  • /etc/apache2
  • /var/www/html

Trac Wiki and Defect Tracking

  • /var/local/trac
  • /var/local/trac/conf/trac.ini