Visual Arts Press Blog

The all knowing, ever present VAP knowledge base

Add image to email signature

 

1) Upload image to Google Drive and turn Link Sharing on

2) Login to Gmail –> Settings –> Signature –> Add Image

3) Choose the image from Drive

4) Highlight the image –> Add Link –> Change –> insert URL

5) Save changes and test

 

Written by ecorriel

May 22nd, 2018 at 7:43 pm

Posted in office

Restoring files from backup

As of 1/26/18 all of our shares (current, grad-catalogs, mediabeacon, sva-edu-redesign, va-journal, and viewbook) are being backed up daily onto a 40TB drive called Freezer which is connected directly to our MacPro server. To restore an item:

  1. In Finder –> Connect To Server (cmd +K)
  2. connect to smb://vap.sva.edu
  3. Choose Freezer as the drive to mount
  4. Browse Freezer to find the desired file
Note that the file that resides in the same location as the original (on Freezer) is the latest version of that file. Previous versions of the file, if they exist will be in a folder called _CCC SafetyNet, which will exist in the same directory as the file.

 

Written by ecorriel

January 26th, 2018 at 9:27 pm

Posted in office,Server

Using volumes on vap-storage

1) Finder > Go > Connect To Server (cmd+K)

  • Server Address: smb://vap-storage.local.
  • If that doesn’t work you can try smb://192.168.252.10
  • You don’t need to have the “smb://” part, but it will take longer to connect if you leave it out.
  • Click the + to add that address to Favorite Servers

2) Mount the desired volume(s)

Select the desired volume(s) to mount. You can mount multiple volumes by holding down cmd.

3) Finding the mounted volumes

The mounted volumes will appear in on your desktop and in Finder

In Finder the volumes will appear under your computer name in Devices. You can also drag the volumes into the sidebar for easier access.

 

If you need a new volume added, please contact either Eric or Declan.

 

4) File naming rules

You cannot use the following names for files or folders:

  • CON, PRN, AUX, CLOCK$, NUL
  • COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9
  • LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7

So lpt1.jpg is illegal but lpt1asdf.jpg is not. You cannot have a folder named con or CON but you can have conn.

This is possibly because, as per OWC’s recommendation, we are using the smb protocol to connect to vap-storage.local. SMB is a Windows protocol that has been widely adopted, even by Apple. Those “reserved words” are Windows related; more here.

It does not appear that there are any characters you cannot use in either filenames or folder names. That said, best practices would be to avoid the following in filenames or folders:

  • < (less than)
  • > (greater than)
  • : (colon)
  • ” (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk)

For more on file naming best practices, see here.

Access

Note that only computers that are physically connected to our network via ethernet can access our storage. This is called a “private network.” Laptops on wifi will not be able to access it, nor will we be able to access it from home directly.

 

Performance

The old mediabeacon transferred files at a sustained speed of 20mb/sec. This new set up is 110mb/sec, which is just slightly slower than our Thunderbolt drives (130mb/sec). So working off the callisto should be completely do-able.

Written by ecorriel

February 2nd, 2017 at 10:12 pm

Posted in MediaBeacon

Setting up a Mac to connect to the Callisto

1) Ethernet 2 connection

Any client Mac connects to the Callisto on VAP’s private network. Each client on the network needs to have a manually assigned, unique IP address. As of 2/1/17 these addresses are assigned as follows:

  • 192.168.252.10 –> Callisto server
  • 192.168.252.11 –> Callisto IPMI
  • 192.168.252.100 –> VAPress-25 (EC)
  • 192.168.252.101 –> webthing2
  • 192.168.252.102 –> VAPress-26 (DWV)
  • 192.168.252.103 –> printthing2
  • 192.168.252.104 –> VAPress-17 (SL)
  • 192.168.252.105 –> VAPress-22 (RD)
  • 192.168.252.106 –> printthing1
  • 192.168.252.107 –> ganderson
  • 192.168.252.108 –> VAPress-23 (BS)
  • 192.168.252.109 –> VAPress-25 (JL)
  • 192.168.252.110 –> VAPress-21 (LT)
  • 192.168.252.111 –> webthing1
  • 192.168.252.112 –> vap server
  • 192.168.252.113 –> printthing3
  • 192.168.252.114 –> macbook air
  • 192.168.252.115 –> printthing4
  • 192.168.252.116 –> brian laptop
  • 192.168.252.117 –> VAPTV
The appropriate IP needs to be entered in System Preferences > Network > Ethernet 2.
Note the subnet mask is 255.255.255.0.

2) Set config settings

  • For each client, two things need to be done:  add an entry in /etc/hosts for 192.168.252.10 vap-storage.local
  • Create /etc/nsmb.conf to increase speed from 50/mb sec to 100+mb/sec (as per the attached PDF from OWC)
  • Download vap-storage.config.sh
Attached is a shell script that automatically does both of these things. The script needs to be run from Terminal and requires sudo privileges. As of 2/1/17 this has been run on all machines, but may need to be re-run depending on OS updates.
OWC SMB config.pdf

Written by ecorriel

February 2nd, 2017 at 7:53 pm

Posted in MediaBeacon

Volume creation and general config on the Callisto

Please note: This should only be done by Eric or Declan, as they have training on the system. This post serves as reference for them. Remember the chain: root –> group –> user –> share

1) Login and create a new dataset

Go to http://vap-storage.local using root/svavap.
 
Storage > select the second “pool” > click Create Dataset on the bottom of the page

 

 

Name the dataset (no spaces or special characters) and set the Share Type to Windows

 

2) Create a user to own the share (in Account)

The username should be the exact same as the share name. This will automatically create a group of the same name. Password: svavap. No additional auxillary groups need to be added.

 

3) Change the permissions on the dataset

Click the key icon at the bottom of the Storage screen. Set the user and group to what was just created. Make sure Permissions Type is Windows.

 

4) Create the SMB Share (in Sharing)

Set the path to the dataset, name is the same as the associated user, and make sure the VSF Objects are catia, fruit, and streams_xattr–in that order

 

5) Add permissions for each user that needs access


 

Notes

  • Sometimes newly created shares take a few hours to propagate to Finder on the client side. Sometimes deleting the login keychain will help. Applications > Utilities > Keychain Access. Search for vap-storage and delete the key. It will be recreated next time you login.
  • If vap-storage.local doesn’t seem to be working you can always try by IP: 192.168.252.10

 

Setting up from scratch

Follow these screenshots to set up the callisto from scratch.
 

IPMI

It is also possible to connect to the callisto’s OS through it’s IPMI port. Go to http://192.168.252.11, u/p: ADMIN/ADMIN. Honestly, it’s easier to physically go to the box in the closet

Written by ecorriel

February 1st, 2017 at 10:39 pm

Posted in MediaBeacon

In case of emergency, break glass…

Symptom: Website seems unresponsive or a known page is throwing a 500 Internal Server Error
Prescription: SSH into production and run $ top. If CPU is spiking (consistently greater than 85%) then something is wrong. The general culprits are either MySQL or Apache. Generally you can tell which is the problem from top by looking at CPU usage. Regardless you’ll probably want to do the following:

  • Verify MySql is operational and accessible by logging in: $ mysql -uroot -psvaW3bpr0ject
  • The site uses the sva_sf2 database, so in addition you can do: > use sva_sf2; select count(*) from pages; and you should get something greater than 7,000. In the off chance you should need to restore or compare against a previous database, daily backups are in /var/www/database_backups
  • If it seems that apache is borking (high CPU): $ sudo service httpd restart
  • If that still didn’t do it, then $ cd /var/www/html/sva/releases/release/ and run $ sudo ./clear_cache.sh, and restart Apache after that
  • If that fails and you think the problem is with mysql then first shutdown apache:
    • $ sudo service httpd stop
    • $ mysqladmin -uroot -psvaW3bpr0ject shutdown
    • $ sudo mysqld_safe
    • $ sudo service httpd start
  • If you cannot SSH into the box then there’s nothing you can do except get in touch with IT (Ian, Brian, Cosmin) and have them reach out to Rackspace to restart the server.
Symptom: CE course is not on the website/has the wrong info
Prescription: 90% of the time this is a problem with how the course was entered by the Registrar. The entire CE workflow is documented here (TL;DR) but the basic things you want to check are:
  • Make sure the course is in the Regbook database (connection details below)
  • All CE courses are stored in either one of two tables: regbook_sections_ft for full-time courses and regbook_sections_ce for regular non-credit CE courses (90% of courses are in here)
  • The first thing you’ll want to do is verify that the course is in the appropriate table. So in SequelPro, find the course (in whichever table it’s supposed to be in) by Section number (ADC-2020-A). If the course is found, make sure it exists for the correct term (15/CU, for example, is 2015 Summer. FA is Fall and CS is Spring–I’m pretty sure about those but not 100%)
  • If the course is is in regbook_sections_ce then the course should be imported into SVA.edu > course_pages table. All courses in regbook_sections_ce are imported into course_pages, no other requirements need to be met.
  • If the course is in regbook_sections_ft then you have to make sure the schedule_type field=D as only this type of course will be imported.
  • If the course is not in either of these tables, then the problem resides with either the Registrar or Colleague Computing. Either way you’ll want to send an email to Elena Blank and Celeste Barns asking them to investigate.
  • If the course is one of these tables but is not being imported into SVA.edu then try importing courses manually
    • SSH into production
    • $ cd /var/www/html/sva/releases/release/
    • $ ./app/console sva:ingest-regbook-import (no sudo) – this is for the regbook_sections_ce table
    • $ ./app/console/sva:set-undergraduate-credit-courses (no sudo) – this is for the regbook_sections_ft table
  • Either the command will run successfully, or more likely if it isn’t working, it will throw an error. If it gives a permissions error, see the fix to cron events below. Otherwise debug normally.
  • If you need to start debugging anything related to CE, first know whether you’re dealing with a regular ce course or full-time course. Then go into the appropriate ModelBundle/Command (either ingestRegbookImport or setUndergraduateCreditCourses) and from there you’ll most likely find yourself in ModelBundle/Service/SearchCourse…
Symptom: A cron event, such as ce courses are not importing or feeds/tweets are not updating
Prescription: Most of the time this is a permissions issue that running the clear-cache script will fix.
  • If clear_cache doesn’t fix it, run $ sudo chmod -R 777 /dev/shm/sva, then $ sudo ./clear_cache.sh again
  • Occasionally the update-feed-sources command will choke on a poorly formed feed url or feed response. This is pretty easy to diagnose, just run the command from the server ( $ cd /var/www/html/sva/releases/release/app/console sva:update-feed-sources ) and watch the output, then disable that feed from within the CMS

Written by ecorriel

June 8th, 2015 at 9:18 pm

Posted in web

Updating WordPress as git submodule

ceblog.sva.edu has WordPress installed as a git submodule.

  1. Do this locally first(!) but if it’s working locally then
  2. SSH into the server (172.22.1.42)
  3. cd /var/www/html/ceblog.sva.edu/wordpress
  4. Note the current WP version: git describe –tags
  5. Refresh tags: git fetch –tags
  6. git checkout 4.X
  7. Hopefully nothing broke…
When setting this up locally for the first time, after pulling down the repo:
  1. git submodule init
  2. git submodule update
  3. git submodule sync
  4. cd wordpress
  5. git checkout 4.X
Gotchas
  • Make sure you copy wp-config.php and .htaccess from a working server (production).  These have been modified to support the submodule.

Written by ecorriel

February 18th, 2015 at 10:46 pm

Posted in Uncategorized

Links from Symfony Live 2014

Written by ecorriel

October 10th, 2014 at 7:11 pm

Posted in web

Create SVA Homepage Slideshow from InDesign doc

Based on this InDesign contact sheet:

Create a new InDesign document (intent: web; size 980px by 380px):

Copy the image from the contact sheet

Paste it to the new InDesign file and scale it (usually 682%):

Repeat this for every image and export them as jpeg!

Written by web

August 27th, 2014 at 5:06 pm

Posted in web

PHP, MySQL, Apache on beta, prod, and sf2 servers

Settings for:

  • sva.edu (172.22.1.189)
  • beta.sva.edu (172.22.1.188)
  • symfony beta server (184.75.59.178)
  • symfony prod server (184.75.59.179)

Apache
/etc/httpd/conf/httpd.conf
/etc/httpd/logs
> apachectl restart

PHP
/etc/php.ini

MySQL for sva.edu & beta.sva.edu
/etc/init.d/mysqld start

MySQL for sf2 servers
host: database3.sva.edu
u/p: vap/svaW3bpr0ject

Web dir
/var/www/html

PHPMyAdmin (only for sf2 servers)
db3phpmyadmin.sva.edu

Written by ecorriel

February 24th, 2014 at 8:27 pm

Posted in admin,web