This document provides instructions for setting up and using the NetApp Update Center application. It outlines steps to install required software, set up the database, and start the Rails server. It then describes the basic user workflow of signing up, signing in, adding plugins, and editing plugin details. Key features of the Update Center like the routes, models, and validations for user and plugin data are also overviewed.
1. NetApp Update Center User’s Guide
First complete all steps outlined in the Install Guide, located in the root directory.
At this point you should have already
● Installed and setup your local version of Ruby
● Installed and setup the Ruby Development Kit
● Cloned or Forked a copy of the NetApp Update Center codebase from Github
● Made the required gem file edit outlined in the install guide
● Ran bundle install command to download, install and configure all needed Ruby Gems
rake routes
Navigate to the root folder named SC-UpdateCenter. Open a command prompt window there and run the rake routes
command
rake routes
The output should look something like this:
Prefix Verb URI Pattern Controller#Action
welcome_index GET /welcome/index(.:format) welcome#index
plugins_getlatestversion GET /plugins/getlatestversion(.:format) plugins#getlatestversion
GET /plugins/getlatestversion/:name(.:format) plugins#getlatestversion
sessions POST /sessions(.:format) sessions#create
new_session GET /sessions/new(.:format) sessions#new
session DELETE /sessions/:id(.:format) sessions#destroy
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PATCH /users/:id(.:format) users#update
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
plugins GET /plugins(.:format) plugins#index
POST /plugins(.:format) plugins#create
new_plugin GET /plugins/new(.:format) plugins#new
edit_plugin GET /plugins/:id/edit(.:format) plugins#edit
plugin GET /plugins/:id(.:format) plugins#show
PATCH /plugins/:id(.:format) plugins#update
PUT /plugins/:id(.:format) plugins#update
DELETE /plugins/:id(.:format) plugins#destroy
root GET / welcome#index
signup GET /signup(.:format) users#new
signin GET /signin(.:format) sessions#new
signout DELETE /signout(.:format) sessions#destroy
This defines all the possible routes for the Update Center, showing the type of request used and the path for each task.
Prepare Database
Next after bundle install and rake routes complete successfully you are now able to prepare the database. To do this use
2. the following rake command:
rake db:migrate
The command above “rake db:migrate” runs any pending migrations on the database and updates db/schema.rb file. Now
that the database is setup you must now start the server.
Rails Server
Open a new command window on the Update Center root directory. Then type the command:
rails s
This command is a shortcut for stating the server you can alternately run command:
rails server
They will both start the Update Center web server,you should see the output below after running the “rails s” or “rails
server” command
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2013-10-18 03:08:44] INFO WEBrick 1.3.1
[2013-10-18 03:08:44] INFO ruby 2.0.0 (2013-06-27) [i386-mingw32]
[2013-10-18 03:08:44] INFO WEBrick::HTTPServer#start: pid=13340 port=3000
Note - You can stop the server by typing Ctrl-C in the command window running the server.
After this information is printed in the command window you are ready to start using the NetApp Snap Creator Update
Center.
Update Center Sign Up Page
You can access the Update Center by opening any web browser and navigating to the address
localhost:3000/users/new
The screenshot below is the Sign Up page for Update Center Users. This page may be restricted for some users,as only
approved users will be able to sign up to use the Update Center. The Sign Up page is shown below.
3. To signup youmust enter
● your name (mustbe presentatleast4 charactersand lessthan40 characters)
● your email address(mustbe present,invalidformat ex:someone@valid.edu,lessthan40 characters,and
unique ( thisaddressmustalsoNOT currentlybe inuse byanotheruserof Update Center)
● your password(mustbe presentandatleast6 characters andlessthan40 characters)
● your passwordconfirmation(mustmatchexactlythe contentsinthe passwordfield)
If you attemptto Signupfor the Update Centeranddo notmeetthese criteria,thenyouwill be metwillanerrorscreen
as all the above fieldsare validatedbefore saving.
Example errorscreen:
4. In the above example,the use name wastooshort,the email wasinan invalidform, the passwordconfirmationdidn’t
match the passwordandthe passwordwasalsotoo small.Whenall fieldsare filledinwithcorrectvaluesthe usergeta
successmessage anditautomatically signedin.The useristhentakentothe pluginsscreen.
Example screenshotbelow.
5. Once the user hascreatedan account, theyare able tosignin usingthe address
http://localhost:3000/signin
Users shouldsigninusingthe email andpasswordforthe Update Center.The signinpage is displayedbelow
6. Afterclickingsigninthe userwill see the same page thatwasdisplayedafterasuccessful signup.Thatpage listsplugins
alongwitha SignedInmessage ingreen.Example screenshotbelow
From thispage the usercan use the linklabeledPluginstosee the PluginsTable.There currentlyare NOTanypluginsto
viewsothe page is prettyempty.Itlookslike this:
To create an entryin the plugintable clickonthe buttonlabeledNew Plugin.Thiswill take youtothe Create Plugin
Page.Example shownbelow:
7. From thispage a usercan add Pluginstothe PluginsDatabase of Update Center.A validpluginentrymusthave
● a name (at least4 charactersand a maximumof 40 characters)
● a Major Versionnumber(thismustbe anintegeronly,andmustbe greaterthan or equal to0 )
● a Minor Versionnumber(thismustbe anintegeronly,andmustbe greaterthanor equal to 0 )
● a RevisionNumber(thismustbe anintegeronly,andmustbe greaterthan or equal to0 )
● a Buildnumber(thismustbe an integeronly,andmustbe greaterthanor equal to 0 )
If any of these fieldshave incorrectvalues(i.e.negative,fractionsorotherincorrectvalues) Update Centerwill not
accept the pluginentryandwill showanerrorpage like below
8. The above error page showsmultiple errorsandalsolistseachof them inred.The errorsabove are
● the Name “Coo” istoo short
● the major version(-1) mustbe greaterthanor equal to 0
● the minorversion(.4) mustbe an integer
● the revisionnumbermustbe greaterthanor equal to0
Aftercorrectingthe errorsabove and enteringinvalidvalueswe are able tocreate a pluginentrytothe database.Click
on the ShowPlugin,Agent,orServerCompatibilitiesbuttonstoview adropdownlistof all available componentsand
checkwhichcomponentsare compatible withthisnew plugin.Afterclickingthe Create Pluginbuttonapage loadsthat
showsyouthe entrythat you justaddedalongwithitsversioninformation.Itisshowninthe below screenshot:
Nowclickeitherthe backlinkor the Pluginslinkabove will bringyoubacktothe pluginspage,youcansee itnow listthe
pluginyoujustcreated.
9. Nowthat a pluginhasbeencreated,note the optionsthatexistforthe plugin.Theyare shownaslinksatthe endof each
line thatlista plugin.Onthe above page youcan see the links“Show”,“Edit”and “Delete”.Clickingonone of these links
allowsyoutocomplete the specifiedaction. Forexample if youclickthe linkforedityouwill be able toeditthe plugin
informationusingapage like the one below
10. Once you have made the needededitstothe plugininformation,clickthe Update PluginButtontoupdate the database
entryfor that plugin. Youwill receive aPluginUpdatedconfirmationmessage andbe shownapage like the one below:
Use the pluginpage toadd all pluginsandtheirversioninformation.