Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @classmethod
- def setUpClass(cls):
- """Read the bundle in and deploy the bundle."""
- # Get the relative bundle path from the environment variable.
- cls.bundle = os.getenv('BUNDLE', 'bundle.yaml')
- # Create a path to the bundle based on this file's location.
- cls.bundle_path = os.path.join(os.path.dirname(__file__),
- '..',
- cls.bundle)
- # Normalize the path to the bundle.
- cls.bundle_path = os.path.abspath(cls.bundle_path)
- print('Deploying bundle: {0}'.format(cls.bundle_path))
- cls.deployment = amulet.Deployment()
- with open(cls.bundle_path, 'r') as bundle_file:
- contents = yaml.safe_load(bundle_file)
- cls.deployment.load(contents)
- # Allow some time for Juju to provision and deploy the bundle.
- cls.deployment.setup(timeout=SECONDS_TO_WAIT)
- # Wait for the system to settle down.
- cls.deployment.sentry.wait()
- cls.k8s = cls.deployment.sentry['kubernetes']
- cls.etcd = cls.deployment.sentry['etcd']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement