Before deploying the application, you must first understand the VMC, which is actually a Unix command-line tool to the next control CF, mainly used to configure and deploy applications, etc., VMC under various platforms have different versions (windows, Mac, Linux), my environment the machine is Mac OS X Lion, Cloud Foundry deployment inside the Ubuntu virtual machine, install the Mac VMC is very simple, direct a command on the bin the.
[plain] view plaincopy
sudo gem install vmc
explain here, because, according to VMC must rely on ruby and ruby Gems, while OS X is built directly into the ruby 1.8.7 version, so it can be installed directly, if it is, then Ubuntu or Windows , you must first follow ruby environments.
different platforms VMC detailed installation documentation can be found here: http://docs.cloudfoundry.com/tools/vmc/installing-vmc.html
vmc tools installed, you can operate the CF, first make sure the inside of Cloud Foundry virtual machine has started, and then enter the command in the Mac Terminal vmc target ; api.vcap.me, here (api.vcap.me) CF is inside the virtual machine name, you can be understood as the name of the Cloud Foundry instance, the connection is successful, you can view CF platform vmc info information.
connection is complete, you can register a user and log CF, through the command: vmc register - email test@test.com - passwd 1234 and vmc ; login - email test@test.com - passwd 1234
By vmc help can also view the command help
The next test deployment of a HelloWorld App up
First on your Mac machine create a directory, such as ~ / Hello
then add a hello.rb file, which code is as follows:
Save and exit
then in the current directory, use the vmc push command, this process will ask you how much memory to use, the need for services, etc.
After successful deployment, the web browser can access the input hello.vcap.me app just deployed a
By vmc apps command you can see all the applications running status
Overall feeling: In the Cloud Foundry app is indeed a top speed of deployment, eliminating a lot of trouble to build the environment.
------ Solution ---------------------------------------- ----
I also encountered the problem upstairs, what causes it?
perform vmc info no problem
C: \ Documents and Settings \ zhangdongqi> vmc target
[http://api.vcap.me]
C: \ Documents and Settings \ zhangdongqi> vmc info
VMware's Cloud Application Platform
For support visit http://support.cloudfoundry.com
Target: http://api.vcap.me (v0.999)
Client: v0.3.21
But when there are problems landing:
C: \ Documents and Settings \ zhangdongqi> vmc login
Attempting login to [http://api.vcap.me]
Email: test@test.com
Password: ****
Problem with login to 'http://api.vcap.me', target refused connection (because the target
machine actively refused it can not connect. - Connect (2)), try again or register for an account.
help! ! ! !
------ Solution ---------------------------------------- ----
cf installed no problem running on machines
root @ SNDA-172-17-15-116: ~ / cloudfoundry / vcap / dev_setup / roles # vmc login
Attempting login to [http://api.vcap.me]
tEmail: test@test.com
Password: ****
Successfully logged into [http://api.vcap.me]
remote can not login.
------ Solution ------------------------------------ --------
I encountered the same problem under win7, and later resolved. Methods are as follows:
Download OpenSSH 4.3p2 for Windows (or 4.X series, the latest version), from http://sshwindows.webheat.co.uk/display/sshwindows/OpenSSH+for+Windows
installation, open cmd, execute the following command:
ssh-L 80:
then VMC 0.3.18 version to access cloudfoundry, all OK
Reference: https://github.com/cloudfoundry/vcap # readme
------ Solution --------------------- -----------------------
This is the most common problem. github ssh tunnel has been described above method.
Another way is, in the hosts file inside with api.vcap.me,
------ For reference only -------------------------------------- -
most importantly, most do not need to rely on the introduction of, or contamination code. GAE can contrast with Amazon EBS.
------ For reference only -------------------------------------- -
I use a multi-node installation, all components are run successfully, but when executed vmc info when an error:
HTTP exception: Errno :: ECONNREFUSED: Connection refused - connect (2)
is what causes it?
------ For reference only -------------------------------------- -
没有评论:
发表评论