Header left.png

Difference between revisions of "Web Services"

From Systems Group
Jump to: navigation, search
Line 10: Line 10:
 
# SSH into the department's Linux servers (linux-new.cs.odu.edu)
 
# SSH into the department's Linux servers (linux-new.cs.odu.edu)
 
<p style="padding: 0.5em 0.5em 0.5em 40px; margin: 0.5em 0; border: 1px solid #ddd; border-color: #ac6600; background-color: #f6efe5;">  
 
<p style="padding: 0.5em 0.5em 0.5em 40px; margin: 0.5em 0; border: 1px solid #ddd; border-color: #ac6600; background-color: #f6efe5;">  
Hello
+
<code> webcli </code> is currently only installed on the linux-new.cs.odu.edu cluster
 
</p>  
 
</p>  
 
# Run the following commands to create a directory at /home/<username>/secure_html and give read and directory listing permissions to other user set:
 
# Run the following commands to create a directory at /home/<username>/secure_html and give read and directory listing permissions to other user set:

Revision as of 20:51, 12 February 2020

The ODU CS Department provides faculty and students the ability to host web pages from their CS Unix Account.

Users interact with this system through two main components, the ~/secure_html directory and the command line tool webcli

Basic Usage

  1. SSH into the department's Linux servers (linux-new.cs.odu.edu)

webcli is currently only installed on the linux-new.cs.odu.edu cluster

  1. Run the following commands to create a directory at /home/<username>/secure_html and give read and directory listing permissions to other user set:
 mkdir ~/secure_html
 chmod o+rx ~/secure_html
  1. Add some serve-able content to your ~/secure_html directory, a simple example:
 echo "Hello world!" > ~/secure_html/index.html
 chmod o+r ~/secure_html/index.html
  1. To start the personal webserver, users must use the webcli tool as follows:
 webcli start
This command will prompt for your CS account password, to ensure only you can start your own webpage.
A successful command will look like so:
 $ webcli start
 Username: <username>
 Password: **********
 Service is starting. It will be available at https://web.cs.odu.edu/~<username> soon.
 This may take a few moments.
 

This command starts a personal webserver for the individual user, by default it runs with Apache PHP7. See the advanced usage for more information.


Advanced Usage

The webcli tool is used for controlling the user's personal webserver through use of Kubernetes containerization. With this tool, the user can pick between multiple provided webserver templates to build their webpage using their desired technology.

The webcli tool has multiple subcommands and parameters for the available actions with this solution:

  • List Images - List the available container images for your personal webserver.
 webcli listimages
  • Start - turn on your personal webserver container.
 webcli start
This subcommand can be given the following optional subflags:
--image IMAGE, -i IMAGE - select the image to use for your webserver. find the available images using `listimages`.
  • Stop - turn off your personal webserver container.
 webcli stop
  • Restart - restart your personal webserver container.
 webcli restart
  • Status - determine whether your personal webserver container is currently running.
 webcli status
Currently Available Webserver Images
Image name Description Notes
apache-php7 Runs an Apache PHP 7 webserver. Supports .htaccess files
nginx Runs a basic static webpage served by Nginx. Does not support .htaccess files or PHP.