1. NetApp Update Center Installation
& Configuration Guide
Setup Ruby Development Environment
Install and Configure Windows for Ruby Development:
Note: these steps are precisely what is needed to set up our entire development environment,
from scratch to deploy. HOWEVER, at this time they only exist for installation and setup on
Windows. Users who run Mac OS X and/or Linux will follow very similar steps and are
encouraged to edit this document and add any information needed to setup the environment on
those systems.
Required Software:
● Ruby Version 2.0.0
● Developer's Kit for Ruby
DownloadSoftware
Go to the Ruby Installer for Windows website here
Get the Ruby 2.0.0 installer:
Download the file named 'rubyinstaller-2.0.0-p247.exe' <--- or use this direct link
From the same page also download the Developer's Kit for Ruby: Download the file
named 'DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe' <--- or use this direct link
Install Software
Run the Ruby Installer program (rubyinstaller-2.0.0-p247.exe) and use it to install Ruby to
C:RubyRuby200 . This guide will use this path as the default pathname for Ruby, this path will
2. sometimes be referred to in this guide as C:<RubyHome>
Note: You may install Ruby to a different path, but the pathname must NOT CONTAIN
SPACES!! If your pathname contains spaces it WILL cause issues.
Now Install the Developer's Kit by running the file 'DevKit-mingw64-32-4.7.2-20130224-1151-
sfx.exe' downloaded previously.
This will extract the Developer's Kit to a location you specify. We recommend extracting the
Dev Kit to a new folder called DevKit inside the Ruby Install folder. Example: If you install
Ruby to the recommended pathname above (C:RubyRuby200) then we recommend installing
the DevKit to C:RubyDevKit. This guide will refer to this location as C:<DevKit>
Again Note: The Developers Kit may be install to a different directory but *the pathname must
NOT CONTAIN SPACES**!! If your DevKit pathname contains spaces it WILL cause issues.*
Open a command shell and cd to the DevKit install directory C:RubyDevKit
Then type into the command shell window:
ruby dk.rb init
Then type the command
ruby dk.rb install --force
Next you should update the Gem system for Ruby. To do so type command
gem update --system
Next install the bundler Gem. This Gem will take care of creating your bundle of needed Gems
for Update Center as well as resolving Gem dependency, and updating Gems. Check out details
of the bundler gem here To install the bundler gem type:
gem install bundler
Note: This will install the Bundler Gem,which is required to install update and update all your
Gems at once. We will be using the bundler gem alot, so make sure and complete this step
without errors The screen output should look something like
Fetching: bundler-1.3.5.gem (100%)
Successfully installed bundler-1.3.5
Parsing documentation for bundler-1.3.5
Installing ri documentation for bundler-1.3.5
1 gem installed
Bundler can also check your Gemfile, find all required Gems that are not installed, then
download and install them for you all at once. The simplest way to add all the required Gems
needed for our project is by using the bundler Gem.
3. Get the Current Repository
Next we need to get a copy of the repository for the NetApp Update Center. This repository is
private and you will need to be added to an approved list to use it. Follow the information from
below copied directly from the Contributing.md file in the root of this repo:
Getting Started
● Make sure you have a GitHub account
● Join us at https://snapcreator.netapp.com/join
Making Changes
● HELP NetApp Github Repository
● Guidelines for Plugin Developers
Submitting Changes
● Sign and return the Contributors Agreement to xdl-snapcreator-admin@netapp.com.
● Push your changes to a topic branch in your fork of the repository.
● Submit a pull request to the repository in the NetApp organization.
After you have obtained permission visit the Github page for NetApp Update Center. From there
either clone or fork the repository depending on your access level and intent. If you are not on
the Snap Creator team and want to contribute, you will likely want to fork. If you are unfamiliar
with Git or need help with Git check out the Github help here
Gemfile and Gem Setup
With the repository cloned or forked, you should now have a local folder from Github called SC-
Update Center. That location is the Update Center root directory. Open a command prompt
inside the root directory. We now need to update the local Ruby install with all Gems for Update
Center. The Gemfile in the root of the directory list all needed Gems and their required version
numbers. Our current Gemfile opened in a text editor looks like below:
source 'https://rubygems.org'
group :development, :test do
gem 'rspec-rails', '2.13.1'
4. end
group :test do
#bundle selenium and capybara for testing
gem 'selenium-client'
gem 'selenium-webdriver'
gem 'capybara'
#gem 'rest-client', '1.6.7'
#gem 'mime-types', '>= 1.16'
#gem 'netrc', '0.7.7'
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'bootstrap-sass', '2.3.2.0’
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
5. # Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more:
https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
# Use ActiveModel has_secure_password
gem 'bcrypt-ruby', '3.1.2'
# Use for creating Docs with slick markup
#gem 'rdiscount'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
6. # Use debugger
# gem 'debugger', group: [:development, :test]
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
Note: Inside the Gemfile the # symbol is used for comments and is not parsed by Ruby. So
anything after a # symbol until the end of the line is ignored.
If you cloned or forked the repository then the Gemfile will already be present and setup
correctly. Make sure the Gemfile is present and looks similar to the one above before going
forward. Next we need to get the bundler Gem to parse our Gemfile and install the required
Gems. To do this, type the command:
bundle install
This will run the bundler Gem and find all required Gems and any dependent Gems that need to
be installed. The bundler downloads, install and configures them for you. The output should look
something like this:
Using rake (10.1.0)
Using i18n (0.6.5)
Using minitest (4.7.5)
Using multi_json (1.8.0)
Using atomic (1.1.14)
Using thread_safe (0.1.3)
Using tzinfo (0.3.37)
Using activesupport (4.0.0)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.0)
Using mime-types (1.25)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.0)
Using activemodel (4.0.0)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.0)
Using activerecord (4.0.0)
7. Using bcrypt-ruby (3.1.2)
Using sass (3.2.11)
Using bootstrap-sass (2.3.2.0)
Using mini_portile (0.5.1)
Using nokogiri (1.6.0)
Using xpath (2.0.0)
Using capybara (2.1.0)
Using ffi (1.9.0)
Using childprocess (0.3.9)
Using coffee-script-source (1.6.3)
Using execjs (2.0.2)
Using coffee-script (2.2.0)
Using thor (0.18.1)
Using railties (4.0.0)
Using coffee-rails (4.0.0)
Using diff-lcs (1.2.4)
Using hike (1.2.3)
Using jbuilder (1.5.1)
Using jquery-rails (3.0.4)
Using json (1.8.0)
Using bundler (1.3.5)
Using tilt (1.4.1)
Using sprockets (2.10.0)
Using sprockets-rails (2.0.0)
Using rails (4.0.0)
Using rdoc (3.12.2)
Using rspec-core (2.13.1)
Using rspec-expectations (2.13.0)
Using rspec-mocks (2.13.1)
Using rspec-rails (2.13.1)
Using rubyzip (0.9.9)
Using sass-rails (4.0.0)
Using sdoc (0.3.20)
Using selenium-client (1.2.18)
Using websocket (1.0.7)
Using selenium-webdriver (2.35.1)
Using sqlite3 (1.3.8)
Using turbolinks (1.3.0)
Using uglifier (2.2.1)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Note: you output may list slightly different gems or gem versions. This is just an example.
Note 2: If you get errors while installing the Gems complete the steps below and then re-
run bundle install
Edit Gem Files
At this time under the windows environment, there are two specific edits that must be
made to your installed Gems.
8. ExecJS
First we need to edit the Gem ExecJS to fix a known error running Update Center on windows.
Thanks to Zack Lintzsinger for finding this fix. This error along with its fix is descibed at Stack
Overflow here. I have copied the relevant information below. To edit your ExecJS gem you must
first find your Ruby install folder. If you followed the install guide Ruby is installed to
C:RubyRuby200 .
If you installed to a different path, use the new path in place of C:<RubyHome> below.
We need to edit a file called runtimes.rb that is part of the ExecJS gem. Now that you have
located the Ruby install folder C:<RubyHome>, from there follow the relative path to locate the
runtimes.rb file. Then relative path is
<RubyHome>librubygems2.0.0gemsexecjs-2.0.2libexecjs
then full path on my system is
C:RubyRuby200librubygems2.0.0gemsexecjs-2.0.2libexecjs
Now locate the file runtimes.rb Notice its plural, careful that you don't edit runtime.rb, which is
different and not what we want Once you located the file, open it in your favorite test editor.
First locate line 43, it should look like:
:command => "cscript //E:jscript //Nologo //U",
Change that line by removing the " //U " part only so that the line now looks like:
:command => "cscript //E:jscript //Nologo",
Then we need to make another edit on line 45 containing:
:encoding => 'UTF-16LE' # CScript with //U returns UTF-16LE
You must change the part " UTF-16LE " to be " UTF-8 ". Now the file should look like this:
:encoding => 'UTF-8' # CScript with //U returns UTF-16LE
Using your text editor save the changes to the file. This section of the file should now read:
line 41: JScript = ExternalRuntime.new(
line 42: :name => "JScript",
9. line 43: :command => "cscript //E:jscript //Nologo",
line 44: :runner_path => ExecJS.root + "/support/jscript_runner.js",
line 45: :encoding => 'UTF-8' # CScript with //U returns UTF-16LE
line 46: )
Note The line number and : are from the text editor. You DO NOT type the line number part
Bcrypt
The bcrypt-ruby gem is needed by two other gems in this bundle. These other two gems are the
activemodel gem and the railties gem. Both gems depend on version 3.0.0 of the bcrypt gem.
However any bcrypt gems that are before version 3.1.2 have intermittent windows issue, therefor
our project requires bcrypt-ruby version 3.1.2 . So we need to edit the activemodel gem and
railties gem to reflect the newer version of bcrypt gem or an error will occur.
Brcypt - Active Model Fix
The file that needs to be edited is named secure_password.rd . The relative path is
C:<RubyHome>librubygems2.0.0gemsactivemodel-4.0.0libactive_model .
If you installed Ruby using this guide the full path will be
C:RubyRuby200librubygems2.0.0gemsactivemodel-4.0.0libactive_model
Once in the above directory find the file named secure_password.rb and open it in a text editor.
Find line 47 it should read:
gem 'bcrypt-ruby', '~> 3.0.0'
Edit line 47 to read '~> 3.1.0' the ~> means any version greater or equal to 3.1.0. The line should
now look like:
gem 'bcrypt-ruby', '~> 3.1.0'
Save the file secure_password.rb with your text editor.
Bcrypt - Railties fix
First navigate to the folder with relative path
C:<RubyHome>librubygems2.0.0gemsrailties-4.0.0librailsgeneratorsrailsapptemplates
If you installed Ruby using this guide the full path will be
C:RubyRuby200librubygems2.0.0gemsrailties-4.0.0librailsgeneratorsrailsapptemplates
10. Now locate the file named Gemfile. Open it in a text editor and locate line 19 it should look like
this:
# gem 'bcrypt-ruby', '~> 3.0.0'
Note it may or may not have the # symbol on the line. Now edit the line to remove the # if
present and change 3.0.0 to 3.1.0 . The file should now look like this:
gem 'bcrypt-ruby', '~> 3.1.0'
Now save the file Gemfile with your text editor. That is all the required Gem file edits to make
the local Ruby install compatible with the Update Center. Now run bundle install again and it
should complete without error.
bundle install
**Congratulations! Your systemis now setup to run Update Center. **
Revision Date Details Author
Version 1.1 10/21/2013
Updated document with Github
Markdown
Jason Brown
Version 1.0 09/29/2013 Created Testing Guide Jason Brown
11. Snap Creator Build Instructions updated 9/9/2013
Something that you will find in software projects is that onboarding procedures for
new team members go stale. The good news is that in recent years automation has
made onboarding new team members easier. You’ll find evidence of both sides of
this with Snap Creator.
Required Software:
1. Eclipse
2. Git
3. 1.6 or 1.7 JDK
4. Winant
5. Github Windows Client (Optional)
Check Out the Code:
1. You need a GitHub account with read access to the Snap Creator
project. I think this is now working for everyone.
2. Follow the instruction on GitHub to clone the repo to your machine.
Agent
Build the Agent:
1. cd java-agent/
2. Run gradle.bat or ./gradle to start the gradle bootstrap process.
3. Build the Agent: gradle clean build installApp.
4. Build without running the unit tests: gradle clean build -x test
5. Create Eclipse project files: gradle cleanEclipse eclipse
6. Import the java-agent project into Eclipse
Start the Agent:
1. The “installApp” command you previously executed creates a local install
12. of the Agent.
2. cd install/bin
3. Starting scAgent
a. On Linux run “./scAgent” and you should see: “Usage: ./scAgent
{start|stop|status|restart}”. Running ./scAgent start will start the
agent as a background process.
b. On Windows run “scWatchdog.bat”. This will start the agent in the
foreground. Use ctrl+c to stop the agent. In production, the agent
typically runs as a service, which is a reason we don’t currently have a
scAgent.bat.
Server
Building the Server
● From SC-Framework directory: cd server
● Run: ant clean
● Run: ant
● The above step will build everything, including the GUI, and will take 5 –
10 minutes depending on your system.
● cd scServer
● The scServer directory is destroyed and created each time you execute
the build.
● Replacing "ant" as build step with "ant buildQuick" is faster as it skips the
GUI build, unit tests, checkstyle, cobertura, etc…. You will typically want
to run "ant buildQuick" unless you just pulled fresh changes from the
GitHub repository. Each time you pull changes you will want to do a full
build.
Eclipse Setup
● Install the attached files, from “Problem Building” email, in the SC-
Framework/modules directory and rename them to .project and .classpath
● Import the modules project, in Eclipse, from SC-Framework/modules
● Import the server project, in Eclipse, from SC-Framework/server
● Your projects should now be set up. Each time you perform a "git pull
origin main" to get recent changes from GitHub you will need to refresh
your projects in Eclipse. To do this you can right click on the project, in
Eclipse, and select "Refresh" from the pop-up menu.
Run the Server
● After a successful build: cd server/scServer
● Start the Server: java -Djava.io.tmpdir=./apptemp/ -Xms256m -
Xmx1024m -XX:MaxPermSize=256M -jar snapcreator.jar
● The above parameters can be adjusted to use smaller amounts of
memory if needed.
● Use ctrl+c to stop the server.
● SOAP Web Services - https://127.0.0.1:8443/services/
● Server UI: https://127.0.0.1:8443/ui/
13. Server Configuration
● cd server/scServer/etc
● Open snapcreator.properties in an editor.
o SNAPCREATOR_USER - Default Administrator
o SNAPCREATOR_PASS - Default Administrator password
o SNAPCREATOR_STARTUP_PORT - Port that server listens on
● If you want values that are different than the defaults then you will want
to write a script to run the build and copy a default snapcreator.properties
file here.