• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
The MetaCPAN VM Part II (Using the VM)
 

The MetaCPAN VM Part II (Using the VM)

on

  • 277 views

Now that you have the MetaCPAN VM installed, let's take a look at what you need to know so that you can be productive.

Now that you have the MetaCPAN VM installed, let's take a look at what you need to know so that you can be productive.

Statistics

Views

Total Views
277
Views on SlideShare
277
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    The MetaCPAN VM Part II (Using the VM) The MetaCPAN VM Part II (Using the VM) Presentation Transcript

    • 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