SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringAeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering
Conrad Cruz
 
Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)
Conrad Cruz
 
appserver.io tutorial
appserver.io tutorialappserver.io tutorial
appserver.io tutorial
appserver.io
 

La actualidad más candente (20)

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

Similar a The MetaCPAN VM Part II (Using the VM)

Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
Ranjit Avasarala
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conference
ohadlevy
 
Writing Prefork Workers / Servers
Writing Prefork Workers / ServersWriting Prefork Workers / Servers
Writing Prefork Workers / Servers
Kazuho Oku
 

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

Testing Your Automation Code (Docker Version)
Testing Your Automation Code (Docker Version)Testing Your Automation Code (Docker Version)
Testing Your Automation Code (Docker Version)
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012
 
161208
161208161208
161208
 
Unlocked Nov 2013: Main Slide Pack
Unlocked Nov 2013: Main Slide PackUnlocked Nov 2013: Main Slide Pack
Unlocked Nov 2013: Main Slide Pack
 
Make your cheap VM fly
Make your cheap VM flyMake your cheap VM fly
Make your cheap VM fly
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conference
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
Writing Prefork Workers / Servers
Writing Prefork Workers / ServersWriting Prefork Workers / Servers
Writing Prefork Workers / Servers
 
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
 
Command Line Applications with Ruby
Command Line Applications with RubyCommand Line Applications with Ruby
Command Line Applications with Ruby
 
Plone deployment made easy
Plone deployment made easyPlone deployment made easy
Plone deployment made easy
 
Orchestrated Functional Testing with Puppet-spec and Mspectator
Orchestrated Functional Testing with Puppet-spec and MspectatorOrchestrated Functional Testing with Puppet-spec and Mspectator
Orchestrated Functional Testing with Puppet-spec and Mspectator
 
Dev ops
Dev opsDev ops
Dev ops
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1
 
DevOps Braga #6
DevOps Braga #6DevOps Braga #6
DevOps Braga #6
 
Webinar - Manage Firewall with Puppet
Webinar - Manage Firewall with PuppetWebinar - Manage Firewall with Puppet
Webinar - Manage Firewall with Puppet
 

Último

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

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