The MetaCPAN VM for Dummies Part One (Installation)
-
Upload
olaf-alders -
Category
Technology
-
view
622 -
download
0
description
Transcript of The MetaCPAN VM for Dummies Part One (Installation)
![Page 1: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/1.jpg)
The MetaCPAN VM(for Dummies?)
Olaf Alders @wundercounterToronto Perl Mongers
Oct 24, 2013
Monday, 11 November, 13
![Page 2: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/2.jpg)
Why bother?
Installation and configuration from scratch is non-trivial
Remove some of the up-front cost to contributors
Develop in an environment which closely mimics deployment
Monday, 11 November, 13
![Page 3: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/3.jpg)
Software Requirements
VirtualBox
Vagrant
git
Monday, 11 November, 13
![Page 4: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/4.jpg)
Hardware Requirements
Less than 1 GB hard disk space
Less than 1 GB of RAM
Some arbitrary amount of CPU
Monday, 11 November, 13
![Page 5: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/5.jpg)
That was the minimum
As far as hardware goes, you can scale up
Depends on how far you want to take this
Monday, 11 November, 13
![Page 6: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/6.jpg)
The MetaCPAN StackDebian
puppet
ElasticSearch
Catalyst
CPAN or miniCPAN or even some arbitrary CPAN dirs
perlbrew
Monday, 11 November, 13
![Page 7: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/7.jpg)
The Meta Pieces
cpan-api (the original MetaCPAN)
metacpan-web
metacpan-puppet
metacpan-developer
metacpan-examples
Monday, 11 November, 13
![Page 8: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/8.jpg)
How easy is it?
mkdir metacpan && cd metacpan
git clone git://github.com/CPAN-API/metacpan-puppet.gitgit clone git://github.com/CPAN-API/cpan-api.gitgit clone git://github.com/CPAN-API/metacpan-web.gitgit clone git://github.com/CPAN-API/metacpan-explorer.git
cd ..git clone git://github.com/CPAN-API/metacpan-developer.gitcd metacpan-developer
vagrant up && vagrant ssh
Monday, 11 November, 13
![Page 9: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/9.jpg)
Guest vs Host
Host: your laptop, PC, whatever. your hardware
Guest: the installed VM
Monday, 11 November, 13
![Page 10: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/10.jpg)
So what?
Edit code using the tools you already have installed on the *Host*
What?
Monday, 11 November, 13
![Page 11: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/11.jpg)
No SSH setup required
vagrant ssh “just works”
Monday, 11 November, 13
![Page 12: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/12.jpg)
Port Forwarding “Just works”
cpan-api http://localhost:5000
metacpan-web http://localhost:5001
Monday, 11 November, 13
![Page 13: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/13.jpg)
Sharing files without scp
Files you add to the metacpan-developer folder will be available in /vagrant
Files you add to /vagrant will be available in metacpan-developer
Monday, 11 November, 13
![Page 14: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/14.jpg)
Managing services on the guest
stop, start, restart services
/etc/init.d/metacpan-www
/etc/init.d/metacpan-api
/etc/init.d/elasticsearch
Monday, 11 November, 13
![Page 15: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/15.jpg)
Does it work?
http://localhost:5001
http://0.0.0.0:5001
Monday, 11 November, 13
![Page 16: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/16.jpg)
Having trouble?
The metacpan-developer README has lots of great troubleshooting tips
Monday, 11 November, 13
![Page 17: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/17.jpg)
Maybe modules are missing?
if the dependencies have changed since the Vagrant boxfile was built, you may be missing some modules
sudo /home/metacpan/bin/install_modules
Monday, 11 November, 13
![Page 18: The MetaCPAN VM for Dummies Part One (Installation)](https://reader034.fdocuments.us/reader034/viewer/2022051411/545301fcaf795908308b54cc/html5/thumbnails/18.jpg)
You’re ready to hack
We’ll discuss how to hack MetaCPAN in next month’s presentation
Monday, 11 November, 13