The MetaCPAN VM
Part II

Olaf Alders @wundercounter
Toronto Perl Mongers
Jan 30, 2014

Thursday, 30 January, 14
Installation

Getting started (Part I): http://
www.slideshare.net/oalders/themetacpan-vm-for-dummies-part-oneinstallation

Thursday, 30 January, 14
Starting your VM

cd metacpan/metacpan-developer
vagrant up
vagrant ssh

Thursday, 30 January, 14
Just become metacpan

For almost everything, you'll be
better off as the metacpan user
So, "sudo su metacpan" whenever you
start an SSH session

Thursday, 30 January, 14
Running web tests
sudo su metacpan
cd ~/metacpan.org
prove -lvr t

Thursday, 30 January, 14
Running api tests
# run Elasticsearch in the foreground
# you don't have to stop elasticsearch, but it saves some resources
vagrant ssh
sudo /etc/init.d/elasticsearch stop
sudo /opt/elasticsearch-0.20.2/bin/elasticsearch -f 
-Des.http.port=9900 -Des.cluster.name=testing
# log in with a new session to run the tests
# don't pass the -r flag to prove
vagrant ssh
sudo su metacpan
cd ~/api.metacpan.org
source ~/.metacpanrc
prove -lv t

Thursday, 30 January, 14
Restarting Services
/etc/init.d/metacpan-www restart
/etc/init.d/metacpan-api restart
# if you're running the api locally
sudo /etc/init.d/elasticsearch restart
# if you're indexing the full CPAN
# and want to watch for the latest changes
sudo /etc/init.d/metacpan-watcher start

Thursday, 30 January, 14
Port-Mapped URLs

http://0.0.0.0:5001 (metacpan-web)
http://0.0.0.0:5000 (cpan-api)

Thursday, 30 January, 14
Access and Error Logs

/var/www

Thursday, 30 January, 14
Installing Modules
# front end deps
sudo su metacpan
cd ~/metacpan.org
sudo ~/bin/install_modules --installdeps .
# api deps
cd ~/api.metacpan.org
sudo ~/bin/install_modules --installdeps .
# install some arbitrary module
sudo ~/bin/install_modules Acme::Urinal

Thursday, 30 January, 14
Prefer plackup?
# front end
sudo su metacpan
cd ~/metacpan.org
/etc/init.d/metacpan-www stop
plackup -R lib --port 5001
# api
cd ~/api.metacpan.org
/etc/init.d/metacpan-api stop
plackup -R lib --port 5000

Thursday, 30 January, 14
Prefer carton?
# assumes you are "metacpan" and have stopped services
# front end
cd ~/metacpan.org
carton install
carton exec plackup -R lib --port 5001
# api
cd ~/api.metacpan.org
carton install
carton exec plackup -R lib --port 5000

Thursday, 30 January, 14
Vagrant Workflow

Edit files on the host
Run tests and deploy code on the
guest

Thursday, 30 January, 14
Playing with Puppet
# on the host, in the dev directory you created
cd metacpan/metacpan-puppet
# let's add a new binary (ncdu) to the system
vi modules/metacpan/manifests/packages.pp
package { ncdu: ensure => present }
cd ../../metacpan-developer
vagrant provision

Thursday, 30 January, 14
Now, let's code!

Thursday, 30 January, 14

More Related Content

ODP
Mangling
PDF
No Hugging, No Learning
PDF
The MetaCPAN VM for Dummies Part One (Installation)
PDF
Puppet Camp Berlin 2015: Pedro Pessoa | Puppet at the center of everything - ...
PPT
Vagrant
PDF
Maven 3.0 at Øredev
ODP
Capifony. Minsk PHP MeetUp #11
PDF
Release with confidence
Mangling
No Hugging, No Learning
The MetaCPAN VM for Dummies Part One (Installation)
Puppet Camp Berlin 2015: Pedro Pessoa | Puppet at the center of everything - ...
Vagrant
Maven 3.0 at Øredev
Capifony. Minsk PHP MeetUp #11
Release with confidence

What's hot (20)

PDF
Puppet and Openshift
PDF
Zero Downtime Deployment with Ansible
PPTX
In the desert, without a camel
PDF
Puppet Data Mining
PDF
Puppet - Simple Configuration Management
PDF
Designing net-aws-glacier
PDF
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
PDF
The Challenges of Container Configuration
PDF
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
PPTX
WordPress workflow of the future
PDF
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
PDF
Aeon mike guide transparent ssl filtering
PDF
Aeon mike guide transparent ssl filtering (1)
PDF
Test Driven Development with Puppet - PuppetConf 2014
PDF
Profiling PHP with Xdebug / Webgrind
PDF
Introduction to Vagrant
PDF
Towards Continuous Deployment with Django
PDF
A Continuous Packaging Pipeline
PDF
appserver.io tutorial
PDF
Add new commands in appium 2.0
Puppet and Openshift
Zero Downtime Deployment with Ansible
In the desert, without a camel
Puppet Data Mining
Puppet - Simple Configuration Management
Designing net-aws-glacier
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
The Challenges of Container Configuration
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
WordPress workflow of the future
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering (1)
Test Driven Development with Puppet - PuppetConf 2014
Profiling PHP with Xdebug / Webgrind
Introduction to Vagrant
Towards Continuous Deployment with Django
A Continuous Packaging Pipeline
appserver.io tutorial
Add new commands in appium 2.0
Ad

Similar to The MetaCPAN VM Part II (Using the VM) (20)

PDF
Security Testing Using Infrastructure-As-Code
PPTX
Harmonious Development: Via Vagrant and Puppet
PDF
Developing locally with virtual machines
PDF
Create Disposable Test Environments with Vagrant and Puppet
PDF
Create Disposable Test Environments with Vagrant and Puppet
PPTX
Environments line-up! Vagrant & Puppet 101
PDF
Instant LAMP Stack with Vagrant and Puppet
PPTX
Puppet - Instant Data Center
PDF
Ab(Using) the MetaCPAN API for Fun and Profit v2013
PPTX
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
PDF
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
PDF
Test driven infrastructure
PDF
Vagrant Binding JayDay 2013
PDF
Our Puppet Story (Linuxtag 2014)
PDF
Dev/Stage/Prod Parity with Vagrant
PDF
Vagrant-Binding JUG Dortmund
PDF
The future of the php development environment
PDF
Consistent Development Environment using Vagrant and Chef
PDF
Automated Infrastructure and Application Management
PDF
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Security Testing Using Infrastructure-As-Code
Harmonious Development: Via Vagrant and Puppet
Developing locally with virtual machines
Create Disposable Test Environments with Vagrant and Puppet
Create Disposable Test Environments with Vagrant and Puppet
Environments line-up! Vagrant & Puppet 101
Instant LAMP Stack with Vagrant and Puppet
Puppet - Instant Data Center
Ab(Using) the MetaCPAN API for Fun and Profit v2013
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Test driven infrastructure
Vagrant Binding JayDay 2013
Our Puppet Story (Linuxtag 2014)
Dev/Stage/Prod Parity with Vagrant
Vagrant-Binding JUG Dortmund
The future of the php development environment
Consistent Development Environment using Vagrant and Chef
Automated Infrastructure and Application Management
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Ad

Recently uploaded (20)

PDF
Zenith AI: Advanced Artificial Intelligence
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PPTX
Configure Apache Mutual Authentication
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPTX
Modernising the Digital Integration Hub
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
Zenith AI: Advanced Artificial Intelligence
Module 1.ppt Iot fundamentals and Architecture
A proposed approach for plagiarism detection in Myanmar Unicode text
Microsoft Excel 365/2024 Beginner's training
Developing a website for English-speaking practice to English as a foreign la...
sbt 2.0: go big (Scala Days 2025 edition)
UiPath Agentic Automation session 1: RPA to Agents
Enhancing plagiarism detection using data pre-processing and machine learning...
Configure Apache Mutual Authentication
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Flame analysis and combustion estimation using large language and vision assi...
Modernising the Digital Integration Hub
A contest of sentiment analysis: k-nearest neighbor versus neural network
Comparative analysis of machine learning models for fake news detection in so...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Custom Battery Pack Design Considerations for Performance and Safety
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
1 - Historical Antecedents, Social Consideration.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
OpenACC and Open Hackathons Monthly Highlights July 2025

The MetaCPAN VM Part II (Using the VM)

  • 1. The MetaCPAN VM Part II Olaf Alders @wundercounter Toronto Perl Mongers Jan 30, 2014 Thursday, 30 January, 14
  • 2. Installation Getting started (Part I): http:// www.slideshare.net/oalders/themetacpan-vm-for-dummies-part-oneinstallation Thursday, 30 January, 14
  • 3. Starting your VM cd metacpan/metacpan-developer vagrant up vagrant ssh Thursday, 30 January, 14
  • 4. Just become metacpan For almost everything, you'll be better off as the metacpan user So, "sudo su metacpan" whenever you start an SSH session Thursday, 30 January, 14
  • 5. Running web tests sudo su metacpan cd ~/metacpan.org prove -lvr t Thursday, 30 January, 14
  • 6. Running api tests # run Elasticsearch in the foreground # you don't have to stop elasticsearch, but it saves some resources vagrant ssh sudo /etc/init.d/elasticsearch stop sudo /opt/elasticsearch-0.20.2/bin/elasticsearch -f -Des.http.port=9900 -Des.cluster.name=testing # log in with a new session to run the tests # don't pass the -r flag to prove vagrant ssh sudo su metacpan cd ~/api.metacpan.org source ~/.metacpanrc prove -lv t Thursday, 30 January, 14
  • 7. Restarting Services /etc/init.d/metacpan-www restart /etc/init.d/metacpan-api restart # if you're running the api locally sudo /etc/init.d/elasticsearch restart # if you're indexing the full CPAN # and want to watch for the latest changes sudo /etc/init.d/metacpan-watcher start Thursday, 30 January, 14
  • 9. Access and Error Logs /var/www Thursday, 30 January, 14
  • 10. Installing Modules # front end deps sudo su metacpan cd ~/metacpan.org sudo ~/bin/install_modules --installdeps . # api deps cd ~/api.metacpan.org sudo ~/bin/install_modules --installdeps . # install some arbitrary module sudo ~/bin/install_modules Acme::Urinal Thursday, 30 January, 14
  • 11. Prefer plackup? # front end sudo su metacpan cd ~/metacpan.org /etc/init.d/metacpan-www stop plackup -R lib --port 5001 # api cd ~/api.metacpan.org /etc/init.d/metacpan-api stop plackup -R lib --port 5000 Thursday, 30 January, 14
  • 12. Prefer carton? # assumes you are "metacpan" and have stopped services # front end cd ~/metacpan.org carton install carton exec plackup -R lib --port 5001 # api cd ~/api.metacpan.org carton install carton exec plackup -R lib --port 5000 Thursday, 30 January, 14
  • 13. Vagrant Workflow Edit files on the host Run tests and deploy code on the guest Thursday, 30 January, 14
  • 14. Playing with Puppet # on the host, in the dev directory you created cd metacpan/metacpan-puppet # let's add a new binary (ncdu) to the system vi modules/metacpan/manifests/packages.pp package { ncdu: ensure => present } cd ../../metacpan-developer vagrant provision Thursday, 30 January, 14
  • 15. Now, let's code! Thursday, 30 January, 14