Difference between revisions of "Create WeBWorK Amazon Machine Image (AMI) File"

From WeBWorK_wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 24: Line 24:
   
 
add the wwadmin user
 
add the wwadmin user
  +
 
sudo aduser wwadmin
 
sudo aduser wwadmin
   
   
Install WW following https://webwork.maa.org/wiki/Installation_Manual_for_2.16_on_Ubuntu
 
  +
Install WW following
  +
# [[Installation_Manual_for_2.16_on_Ubuntu]]
  +
and
  +
# [[Create WeBWorK Virtual Machine (.OVA) File]]
   
 
Before configuring WeBWork, set the server time zone
 
Before configuring WeBWork, set the server time zone
  +
 
sudo timedatectl set-timezone America/New_York
 
sudo timedatectl set-timezone America/New_York
   
Line 37: Line 42:
 
Create the AMI see https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-create-ami-from-instance.html
 
Create the AMI see https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-create-ami-from-instance.html
   
===Follow the standard instructions===
 
 
====site.conf and localoverrides.conf====
 
# use the ip address (e.g. 192.168.201.128) everywhere. Do not use localhost
 
# set password for webworkWrite (wwadmin)
 
 
=== set up MyTestCourse===
 
# add practice users and jsmith/jsmith to myTestCourse
 
# add profa
 
# add the standard sets to myTestCourse
 
 
===Implement all options A-E ===
 
 
 
====Clean up the system====
 
* rm apache's error.log's in /var/log/apache2/
 
* rm apache's access.log's in /var/log/apache2/
 
* rm webwork's timing.log's in /opt/webwork/webwork2/logs/
 
* Remove unneeded backup's in /opt/webwork/webwork2/conf/
 
* Remove contents of /var/www/html/wwtmp/
 
 
wwadmin@wwserver:~$ du -sh /var/cache/apt/archives/
 
du: cannot read directory '/var/cache/apt/archives/partial': Permission denied
 
71M /var/cache/apt/archives/
 
wwadmin@wwserver:~$ sudo apt clean
 
[sudo] password for wwadmin:
 
wwadmin@wwserver:~$ du -sh /var/cache/apt/archives/
 
du: cannot read directory '/var/cache/apt/archives/partial': Permission denied
 
44K /var/cache/apt/archives/
 
 
 
sudo apt autoremove --purge
 
 
====Remove openssh-server====
 
Keeeo openssh
 
 
sudo apt remove openssh-sftp-server
 
sudo apt autoremove
 
 
====Reset CPU's amd Memory====
 
Set the memory to 4 GB and processors to 2
 
 
===Export to an .ova file===
 
 
====Workstation Player====
 
Find the path to your VM.
 
 
Open a command prompt as administrator
 
 
cd E:\Programs\VMware\OVFTool\
 
   
Enter
 
ovftool “C:\the path to your VM\your VMname.vmx” c:\new directory\name.ova
 
 
   
 
[[Category:Developers]]
 
[[Category:Developers]]

Latest revision as of 11:38, 9 August 2021

Instructions for creating a WeBWorK Amazon Machine Image (AMI)

Log into EC2 Dashboard

Locate the current Ubuntu LTS AMI in http://cloud-images.ubuntu.com/locator/ec2/ and search us-east-2 and click on link

Choose an Instance Type e.g. T4g small

ADD Storage

15 GM storage

Also make sure that Delete on Termination is unchecked.


Launch

Follow direction in https://webwork.maa.org/wiki/WeBWorK_2.16_Ubuntu_Server_20.04_LTS_Amazon_Machine_Image about adding security groups, etc

Security groups have to be setup from the AMS dashboard

add the wwadmin user

sudo aduser wwadmin


Install WW following

  1. Installation_Manual_for_2.16_on_Ubuntu

and

  1. Create WeBWorK Virtual Machine (.OVA) File

Before configuring WeBWork, set the server time zone

sudo timedatectl set-timezone America/New_York

Configure WeBWorK, set URL to ip address in site.conf for testing. Set to aws.apizer.org and use Google domains to forward to ip address. Set up HW sets with due dates, class lists, etc the same way as in current AMI's or the current virtual machine image

Create the AMI see https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-create-ami-from-instance.html