-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #361 from MirantisWorkloadMobility/devel
Release 2015-08-27
- Loading branch information
Showing
48 changed files
with
1,968 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Quick Start Guide | ||
|
||
1. Get CloudFerry sources | ||
``` | ||
git clone https://github.com/MirantisWorkloadMobility/CloudFerry.git | ||
cd CloudFerry | ||
git fetch | ||
# The latest code is in devel branch | ||
git checkout -b devel origin/devel | ||
``` | ||
2. Install vagrant (devlab requires vagrant version >= 1.6) | ||
``` | ||
wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.2_x86_64.deb | ||
sudo dpkg -i vagrant_1.7.2_x86_64.deb | ||
``` | ||
3. Install virtualbox hypervisor | ||
``` | ||
sudo apt-get install virtualbox -y | ||
``` | ||
4. Setup development environment | ||
``` | ||
cd CloudFerry/devlab | ||
vagrant up grizzly icehouse | ||
``` | ||
5. Setup virtual environment for cloudferry | ||
``` | ||
apt-get install python-dev python-virtualenv libffi-dev -y | ||
cd CloudFerry | ||
virtualenv .venv | ||
source .venv/bin/activate | ||
pip install pip==6.1.1 | ||
pip install --allow-all-external -r requirements.txt | ||
pip install -r test-requirements.txt | ||
``` | ||
6. Generate cloudferry config for development lab | ||
``` | ||
cd CloudFerry | ||
./devlab/provision/generate_config.sh --cloudferry-path $(pwd) | ||
``` | ||
7. Generate load on source VM (this will create a number of VMs on grizzly node) | ||
``` | ||
cd CloudFerry/devlab/tests | ||
source ./openrc.example | ||
python ./generate_load.py --clean | ||
python ./generate_load.py | ||
``` | ||
8. Run migration | ||
``` | ||
cd CloudFerry | ||
source .venv/bin/activate | ||
fab migrate:configuration.ini,debug=True | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Copyright 2015 Mirantis Inc. | ||
# | ||
# Licensed 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. | ||
|
||
from cloudferrylib.base.action import action | ||
from cloudferrylib.base import exception | ||
from cloudferrylib.utils import utils as utl | ||
|
||
LOG = utl.get_log(__name__) | ||
|
||
|
||
def check(os_api_call, os_api_type, position): | ||
try: | ||
LOG.info("Checking %s APIs availability on %s.", | ||
os_api_type, position.upper()) | ||
os_api_call() | ||
except Exception as e: | ||
message = ('{os_api_type} APIs on {position} check failed with: ' | ||
'"{msg}". Check your configuration.').format( | ||
os_api_type=os_api_type, msg=e.message, position=position.upper()) | ||
LOG.error(message) | ||
raise exception.AbortMigrationError(message) | ||
|
||
|
||
class CheckImageBackend(action.Action): | ||
def run(self, **kwargs): | ||
"""Check image backend by getting list of images.""" | ||
image_resource = self.cloud.resources[utl.IMAGE_RESOURCE] | ||
check(image_resource.glance_client.images.list, 'Glance', | ||
self.cloud.position) | ||
|
||
|
||
class CheckComputeBackend(action.Action): | ||
def run(self, **kwargs): | ||
"""Check compute backend by getting instances list.""" | ||
compute_resource = self.cloud.resources[utl.COMPUTE_RESOURCE] | ||
check(compute_resource.nova_client.servers.list, 'Nova', | ||
self.cloud.position) | ||
|
||
|
||
class CheckStorageBackend(action.Action): | ||
def run(self, **kwargs): | ||
"""Check storage backend by getting volumes list.""" | ||
storage_resource = self.cloud.resources[utl.STORAGE_RESOURCE] | ||
check(storage_resource.cinder_client.volumes.list, 'Cinder', | ||
self.cloud.position) | ||
|
||
|
||
class CheckNetworkingAPIs(action.Action): | ||
def run(self, **kwargs): | ||
"""Check networking backend by getting network list.""" | ||
neutron = self.cloud.resources[utl.NETWORK_RESOURCE] | ||
check(neutron.neutron_client.list_networks, 'Neutron', | ||
self.cloud.position) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.