Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDSTACK-9334: Support jenv and pyenv to manage Java and Python versions #1460

Merged
merged 1 commit into from
May 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.7
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cloudstack
17 changes: 17 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@ Start the MySQL service:

$ service mysqld start

### Using jenv and/or pyenv for Version Management

CloudStack is built using Java and Python. To make selection of these tools versions more consistent and ease installation for developers, optional support for [jenv](http://www.jenv.be/) and [pyenv](https://github.com/yyuu/pyenv) with [virtualenv]|(https://github.com/yyuu/pyenv-virtualenv) is provided. jenv installation instructions are available here and pyenv installation instructions are available here. For users of [oh-my-zsh](http://ohmyz.sh/) there is a pyenv plugin available to trigger configuration of pyenv in a shell session.

Following installation, execute the following commands to configure jenv and pyenv for use with CloudStack development:

'''
# pyenv install 2.7.11 # Install Python 2.7.11
# pyenv virtualenv 2.7.11 cloudstack # Create a cloidstack virtualenv using Python 2.7.11
# pip install -r <root CloudStack source tree>/requirements.txt # Install cloudstack Python dependencies
# jenv add <path to JDK 1.7 installation> # Add Java7 to jenv
'''

*N.B.* If you are running Linux, you may need to install additional packages to allow pyenv to build Python.

Following these steps, jenv and pyenv will use .java-version and .python-version files in the root of the CloudStack source tree to switch to the correct Java version and the cloudstack Python virtualenv for CloudStack development.

## Getting the Source Code

You may get the source code from the repository hosted on Apache:
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,8 @@
<exclude>CONTRIBUTING.md</exclude>
<exclude>tools/docker/Dockerfile</exclude>
<exclude>tools/docker/supervisord.conf</exclude>
<exclude>.java-version</exclude>
<exclude>.python-version</exclude>
<exclude>.idea/</exclude>
<exclude>**/*.log</exclude>
<exclude>**/*.patch</exclude>
Expand Down
21 changes: 21 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Install the latest version of cloudmonkey
cloudmonkey

# Marvin dependencies are installed via its bundle