SlideShare a Scribd company logo
1 of 27
Download to read offline
Jesus Jackson
Developing Rails Apps in
Technical Isolation
Background
● Live in Washington, D.C.
● Software developer who has been leading a
Ruby on Rails project for over 2 years.
● Developer advocate in a Java-based world
Team Background
● 15 developers
● DoD clients in secure spaces
● Development occurs on a restricted intranet
- no way for our application to connect to the
Internet.
Technical Isolation?
No
● Developing on an island :o)
Yes
● Developing apps on an intranet
● No sudo privileges on servers
● Don't have control over firewall rules
What do we do?
How do we manage our Rubies and gemsets behind a
firewalled/restricted environment?
Problem 1: Using RVM
Solution: RVM::FW
● Created by Steven Haddox - a developer who
worked on my team and was instrumental in
our success
● https://github.com/stevenhaddox/rvm_fw
● Sinatra app that runs on a Phusion enabled
web server
● Works by modifying RVM's ~/.rvm/user/db
to point to an internal file which reference
your Rubies.
Set up RVM::FW
1) "rake boot:strap" to download Rubies and
packages
2) Copy contents and deploy to your internal server
3) Install RVM: "bash < <( curl http://<your-server>:<port>/releases/rvm-install-latest )"
4) Configure RVM: "wget http://<your-server>:<port>/db -O ~/.rvm/user/db"
5) "rvm reload"...and viola!
Using RVM::FW
● Other projects on your network can now use
your server to install RVM::FW and
maintain their Rubies.
● http(s)://[your_host]:[port]/db to get a list
of rubies. Your users can copy and paste the
contents into their ~/.rvm/user/db to point
to your RVM::FW instance to download its
Rubies.
● http(s)://[your_host]:[port]/known - will
provide a list of available Rubies when user
does "rvm list known"
Problem #2: Capistrano
Deployment Gotchas
Using Capistrano
● Not very difficult to set up, even in a
restricted environment.
● You need to set up key-based authentication,
which was my team's primary challenge.
Telnet and FTP are not supported.
● By default, Capistrano attempts to use sudo.
"set :user_sudo, false" within deploy.rb to
bypass this.
Capistrano
● Place chmod task in deploy.rb to chmod 775
so releases/### and releases/###/public
are accessible to Apache.
namespace :permissions do
desc "chmod the release and public folder for Apache"
task :make_public do
run "chmod 775 #{release_path}"
run "chmod 775 -R #{release_path}/public"
end
end
Capistrano
● Important to stop and restart Resque
workers
namespace :resque do
desc "Stop resque workers"
task :stop do
begin
run "cd #{shared_path}/path;
RAILS_ENV=production bundle exec rake resque:stop"
rescue Exception => e
puts "!" * 80
"ERROR: Unable to stop Resque workers: #{e}"
puts "!" * 80
end
end
end
How do we test email notifications when the SMTP
server is locked down?
Problem 3: Testing Email
Testing Email Notifications
● Emails blocked when being sent from
ActionMailer
● By default, ActionMailer delivery is sent to
an SMTP server running on your localhost
on port 25.
● SMTP server won't receive emails and don't
have ability to set up another full-fledged
SMTP server and configure ActionMailer to
reference it
Solution: MailCatcher
● Runs a lightweight SMTP server on your
localhost
● Catches any emails sent to it and displays
emails in a nifty interface.
● Configure your app to send mail to smtp:
//127.0.0.1:1025
● View emails at http://127.0.0.1:1080
MailCatcher UI
Problem 4: Using Git
How to use Git in an SVN world
SVN is still prevalent
● Every project on the contract used SVN
● No official server or host for Git on the
intranet.
● Git was misunderstood and misinformation
flew rapidly.
● It was difficult for people to see the benefits
of a distributed versioning control system
because of the small learning curve.
Solution: git svn
● Tool allows you to use Git as a valid client,
but push all of your changes to an SVN
server.
● You can use the nifty features of Git locally
(branching/merging, rebasing, etc.)
● You can use Git locally while the rest of your
team or organization uses SVN.
● It's a great tool to get your team's feet wet
with Git without having to make a complete
commitment.
Using git svn
● "git svn clone [SVN URL] -s" - import your
SVN repo into your local Git repo
● "git commit -am 'My awesome commit
message'" - commit locally without pushing
to the SVN server. You can do this many
times without modifying the SVN repo.
● "git svn dcommit" - Push all of your changes
to the SVN repo. Performs an SVN commit
for each one of your local commits.
● "git svn rebase" - Pull all changes from the
SVN repo and updates your local repo.
git svn caveat
● Remember, you're still using SVN under the
hood.
○ Rebase your work as much as possible.
○ Don't simultaneously interact with a Git repo.
● SVN history is linear
● A "git svn dcommit" rewrites your local Git
to include a unique ID. Working
simultaneously with a remote Git repo can
screw things up. Keep it simple :o)
Solution 2: Gitlab
● If you can host Git on a server, try Gitlab.
● Allows you to manage multiple repos. It's
pretty much your very own Github.
● You can handle user access permissions,
merge requests, issues, wikis, and code
reviews.
Problem 5: Managing Gems
How do we host gems in restricted environments?
Solution: "gem server"
● Rubygems comes with the command "gem
server"
● Running this command will serve all of your
gems from http://localhost:8808
● Visiting the address in your browser will
provide gem details.
● When you install new gems, they'll
automatically be available through your gem
server.
Solution 2: Gem In A Box
● Provides more features, like the ability to
push gems to the server.
● Easy to set up:
○ Create the directory for storing gems
○ Modify the config.ru file to point to the gems
directory.
○ Run the server
● Push gems via the "inabox" command:
○ "gem inabox ./my-awesome-gem-1.0.0.gem"
The end
Questions?

More Related Content

What's hot

Containerised Testing at Demonware : PyCon Ireland 2016
Containerised Testing at Demonware : PyCon Ireland 2016Containerised Testing at Demonware : PyCon Ireland 2016
Containerised Testing at Demonware : PyCon Ireland 2016Thomas Shaw
 
Grunt js and WordPress
Grunt js and WordPressGrunt js and WordPress
Grunt js and WordPressWP Australia
 
Joomla Continuous Delivery with Docker
Joomla Continuous Delivery with DockerJoomla Continuous Delivery with Docker
Joomla Continuous Delivery with DockerJirayut Nimsaeng
 
Docker Swarm 1.12 Overview and Demo
Docker Swarm 1.12 Overview and DemoDocker Swarm 1.12 Overview and Demo
Docker Swarm 1.12 Overview and DemoBrian Christner
 
Docker for tooling
Docker for toolingDocker for tooling
Docker for toolingRafael Gomes
 
Automate CI/CD with Rancher
Automate CI/CD with RancherAutomate CI/CD with Rancher
Automate CI/CD with RancherNick Thomas
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshCodefresh
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePiotr Pelczar
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient waySylvain Rayé
 
Vagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersVagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersSagar Acharya
 
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurzeFuture Processing
 
The pain and gains running Docker in live @Pipedrive
The pain and gains running Docker in live @PipedriveThe pain and gains running Docker in live @Pipedrive
The pain and gains running Docker in live @PipedriveRenno Reinurm
 
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfContinuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfJulia Mateo
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Djangoroskakori
 
Rubygem Dev And Workflow
Rubygem Dev And WorkflowRubygem Dev And Workflow
Rubygem Dev And WorkflowDr Nic Williams
 
Better delivery with DevOps Driven Development
Better delivery with DevOps Driven DevelopmentBetter delivery with DevOps Driven Development
Better delivery with DevOps Driven DevelopmentJirayut Nimsaeng
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with VagrantJohn Coggeshall
 

What's hot (20)

Containerised Testing at Demonware : PyCon Ireland 2016
Containerised Testing at Demonware : PyCon Ireland 2016Containerised Testing at Demonware : PyCon Ireland 2016
Containerised Testing at Demonware : PyCon Ireland 2016
 
Grunt js and WordPress
Grunt js and WordPressGrunt js and WordPress
Grunt js and WordPress
 
Joomla Continuous Delivery with Docker
Joomla Continuous Delivery with DockerJoomla Continuous Delivery with Docker
Joomla Continuous Delivery with Docker
 
Docker Swarm 1.12 Overview and Demo
Docker Swarm 1.12 Overview and DemoDocker Swarm 1.12 Overview and Demo
Docker Swarm 1.12 Overview and Demo
 
Docker e git lab
Docker e git labDocker e git lab
Docker e git lab
 
Docker for tooling
Docker for toolingDocker for tooling
Docker for tooling
 
Automate CI/CD with Rancher
Automate CI/CD with RancherAutomate CI/CD with Rancher
Automate CI/CD with Rancher
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecture
 
Capistrano
CapistranoCapistrano
Capistrano
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 
Vagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersVagrant step-by-step guide for Beginners
Vagrant step-by-step guide for Beginners
 
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
 
The pain and gains running Docker in live @Pipedrive
The pain and gains running Docker in live @PipedriveThe pain and gains running Docker in live @Pipedrive
The pain and gains running Docker in live @Pipedrive
 
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfContinuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Django
 
Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration
 
Rubygem Dev And Workflow
Rubygem Dev And WorkflowRubygem Dev And Workflow
Rubygem Dev And Workflow
 
Better delivery with DevOps Driven Development
Better delivery with DevOps Driven DevelopmentBetter delivery with DevOps Driven Development
Better delivery with DevOps Driven Development
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with Vagrant
 

Similar to Developing Rails Apps in Technical Isolation

GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers WorkshopJody Garnett
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CIOlinData
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingStanislav Osipov
 
Deploying Rails Apps with Chef and Capistrano
 Deploying Rails Apps with Chef and Capistrano Deploying Rails Apps with Chef and Capistrano
Deploying Rails Apps with Chef and CapistranoSmartLogic
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'acorehard_by
 
Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021alinalexandru
 
Volunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportYouSee
 
Upgrade Kubernetes the boring way
Upgrade Kubernetes the boring wayUpgrade Kubernetes the boring way
Upgrade Kubernetes the boring wayOleksandr Slynko
 
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015Chris Gates
 
Automate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsAutomate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsJosh Lee
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerBob Killen
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE Corporation
 
DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015Chris Gates
 
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...DynamicInfraDays
 
Dockerfile for rust project
Dockerfile for rust projectDockerfile for rust project
Dockerfile for rust projectHien Nguyen
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopVelocidex Enterprises
 

Similar to Developing Rails Apps in Technical Isolation (20)

GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CI
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Deploying Rails Apps with Chef and Capistrano
 Deploying Rails Apps with Chef and Capistrano Deploying Rails Apps with Chef and Capistrano
Deploying Rails Apps with Chef and Capistrano
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021
 
Volunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology Support
 
Git pusshuten
Git pusshutenGit pusshuten
Git pusshuten
 
Upgrade Kubernetes the boring way
Upgrade Kubernetes the boring wayUpgrade Kubernetes the boring way
Upgrade Kubernetes the boring way
 
Git
GitGit
Git
 
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
 
Automate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsAutomate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.js
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native World
 
DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015
 
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
 
Container Days
Container DaysContainer Days
Container Days
 
Dockerfile for rust project
Dockerfile for rust projectDockerfile for rust project
Dockerfile for rust project
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor Workshop
 

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Developing Rails Apps in Technical Isolation

  • 1. Jesus Jackson Developing Rails Apps in Technical Isolation
  • 2. Background ● Live in Washington, D.C. ● Software developer who has been leading a Ruby on Rails project for over 2 years. ● Developer advocate in a Java-based world Team Background ● 15 developers ● DoD clients in secure spaces ● Development occurs on a restricted intranet - no way for our application to connect to the Internet.
  • 3. Technical Isolation? No ● Developing on an island :o) Yes ● Developing apps on an intranet ● No sudo privileges on servers ● Don't have control over firewall rules
  • 5.
  • 6. How do we manage our Rubies and gemsets behind a firewalled/restricted environment? Problem 1: Using RVM
  • 7. Solution: RVM::FW ● Created by Steven Haddox - a developer who worked on my team and was instrumental in our success ● https://github.com/stevenhaddox/rvm_fw ● Sinatra app that runs on a Phusion enabled web server ● Works by modifying RVM's ~/.rvm/user/db to point to an internal file which reference your Rubies.
  • 8. Set up RVM::FW 1) "rake boot:strap" to download Rubies and packages 2) Copy contents and deploy to your internal server 3) Install RVM: "bash < <( curl http://<your-server>:<port>/releases/rvm-install-latest )" 4) Configure RVM: "wget http://<your-server>:<port>/db -O ~/.rvm/user/db" 5) "rvm reload"...and viola!
  • 9. Using RVM::FW ● Other projects on your network can now use your server to install RVM::FW and maintain their Rubies. ● http(s)://[your_host]:[port]/db to get a list of rubies. Your users can copy and paste the contents into their ~/.rvm/user/db to point to your RVM::FW instance to download its Rubies. ● http(s)://[your_host]:[port]/known - will provide a list of available Rubies when user does "rvm list known"
  • 11. Using Capistrano ● Not very difficult to set up, even in a restricted environment. ● You need to set up key-based authentication, which was my team's primary challenge. Telnet and FTP are not supported. ● By default, Capistrano attempts to use sudo. "set :user_sudo, false" within deploy.rb to bypass this.
  • 12. Capistrano ● Place chmod task in deploy.rb to chmod 775 so releases/### and releases/###/public are accessible to Apache. namespace :permissions do desc "chmod the release and public folder for Apache" task :make_public do run "chmod 775 #{release_path}" run "chmod 775 -R #{release_path}/public" end end
  • 13. Capistrano ● Important to stop and restart Resque workers namespace :resque do desc "Stop resque workers" task :stop do begin run "cd #{shared_path}/path; RAILS_ENV=production bundle exec rake resque:stop" rescue Exception => e puts "!" * 80 "ERROR: Unable to stop Resque workers: #{e}" puts "!" * 80 end end end
  • 14. How do we test email notifications when the SMTP server is locked down? Problem 3: Testing Email
  • 15. Testing Email Notifications ● Emails blocked when being sent from ActionMailer ● By default, ActionMailer delivery is sent to an SMTP server running on your localhost on port 25. ● SMTP server won't receive emails and don't have ability to set up another full-fledged SMTP server and configure ActionMailer to reference it
  • 16. Solution: MailCatcher ● Runs a lightweight SMTP server on your localhost ● Catches any emails sent to it and displays emails in a nifty interface. ● Configure your app to send mail to smtp: //127.0.0.1:1025 ● View emails at http://127.0.0.1:1080
  • 18. Problem 4: Using Git How to use Git in an SVN world
  • 19. SVN is still prevalent ● Every project on the contract used SVN ● No official server or host for Git on the intranet. ● Git was misunderstood and misinformation flew rapidly. ● It was difficult for people to see the benefits of a distributed versioning control system because of the small learning curve.
  • 20. Solution: git svn ● Tool allows you to use Git as a valid client, but push all of your changes to an SVN server. ● You can use the nifty features of Git locally (branching/merging, rebasing, etc.) ● You can use Git locally while the rest of your team or organization uses SVN. ● It's a great tool to get your team's feet wet with Git without having to make a complete commitment.
  • 21. Using git svn ● "git svn clone [SVN URL] -s" - import your SVN repo into your local Git repo ● "git commit -am 'My awesome commit message'" - commit locally without pushing to the SVN server. You can do this many times without modifying the SVN repo. ● "git svn dcommit" - Push all of your changes to the SVN repo. Performs an SVN commit for each one of your local commits. ● "git svn rebase" - Pull all changes from the SVN repo and updates your local repo.
  • 22. git svn caveat ● Remember, you're still using SVN under the hood. ○ Rebase your work as much as possible. ○ Don't simultaneously interact with a Git repo. ● SVN history is linear ● A "git svn dcommit" rewrites your local Git to include a unique ID. Working simultaneously with a remote Git repo can screw things up. Keep it simple :o)
  • 23. Solution 2: Gitlab ● If you can host Git on a server, try Gitlab. ● Allows you to manage multiple repos. It's pretty much your very own Github. ● You can handle user access permissions, merge requests, issues, wikis, and code reviews.
  • 24. Problem 5: Managing Gems How do we host gems in restricted environments?
  • 25. Solution: "gem server" ● Rubygems comes with the command "gem server" ● Running this command will serve all of your gems from http://localhost:8808 ● Visiting the address in your browser will provide gem details. ● When you install new gems, they'll automatically be available through your gem server.
  • 26. Solution 2: Gem In A Box ● Provides more features, like the ability to push gems to the server. ● Easy to set up: ○ Create the directory for storing gems ○ Modify the config.ru file to point to the gems directory. ○ Run the server ● Push gems via the "inabox" command: ○ "gem inabox ./my-awesome-gem-1.0.0.gem"