Skip to content
daveho edited this page Dec 21, 2012 · 13 revisions

This page describes some things you can configure once you have completed the Bootstrap process.

Configuring port access (required)

You will need to make sure that the webapp server's TCP port 47374 is open to outside connections. The builder(s) will use this port to download student submissions and report test results back to the webapp.

How you will configure this depends on how you are hosting the webapp server. If your IT department has set it up for you, ask them to make sure that TCP port 47374 is open. If you are using EC2, configure the security group to allow incoming connections on TCP port 47374.

Setting up DNS (optional)

If you are running the webapp using a cloud hosting service such as EC2, then in the bootstrap process you might have used a hostname that was provided by the hosting service. For example, an Amazon EC2 server might have a hostname like ec2-107-22-92-250.compute-1.amazonaws.com.

You can make CloudCoder available under a more meaningful hostname by setting up a DNS record for the webapp server. There are a couple ways that you can do this.

  1. You can ask your IT department to add a DNS entry. You will just need to give them the IP address of your webapp server.
  2. You can purchase a domain name, and configure the DNS entry yourself. Generally, the domain name registrars have a web interface that makes it fairly easy to add DNS entries once you have purchased a domain. Either a CNAME or A record will work. Use an A record to associate a DNS name with your webapp server's IP address, or a CNAME record to define a DNS name as an alias for another DNS name (such as the one provided by your hosting service.)

Using a "real" SSL certificate (optional)

The Bootstrap process creates a self-signed (untrusted) SSL certificate, meaning that web browsers will issue a security warning when connecting to the webapp. Self-signed certificates are not insecure per se - data transferred between CloudCoder and the user's web browser will still be encrypted - but the security warning is annoying. You can fix this by installing a "real" SSL certificate. Note that this will require you to have a DNS name for the server, since SSL certificates are tied to domain names.

The most complicated part of installing the SSL certificate is obtaining the SSL certificate: this involves purchasing the certificate from a trusted authority, which in turn requires you to prove that you are the legitimate owner of the domain name for which the certificate is issued. Generally, the process will involve

  1. creating a private key
  2. creating a CSR (certificate signing request) based on the private key
  3. verifying ownership of the domain
  4. receiving the certificate, and
  5. installing the certificate

The certificate authority will have instructions on how to do steps 1-4. (Your IT department may be able to take care of this for you.) Important: when consulting the instructions from your certificate authority, follow the instructions for Apache2.

Step 5 is fairly straightforward once you have the certificate. You will need to edit the file /etc/apache2/sites-available/cloudcoder-ssl on the webapp server as the superuser. For example, run the command

sudo vi /etc/apache2/sites-available/cloudcoder-ssl

You can use an editor other than vi, such as nano, if you prefer.

Edit or add the entries for the SSLCertificateKeyFile, SSLCertificateFile, and (maybe) SSLCertificateChainFile. The SSLCertificateKeyFile should refer to the server private key from which you generated the CSR: make sure that this is a file readable only by the root user. The SSLCertificateFile and SSLCertificateChainFile entries should refer to the certificate files you received from your certificate authority.

If necessary, you should also update the ServerName entry so that it specifies the precise DNS name that you will use. For example, if your server will have the DNS name cloudcoder.yourschool.edu, then the entry should be

ServerName cloudcoder.yourschool.edu:443

Once you have edited cloudcoder-ssl, you should restart Apache with the command

sudo service apache2 restart

Install

Downloads

Screenshots

For more info (demo server, exercise repository, contributing to cloudcoder, etc): cloudcoder.org

Clone this wiki locally