The following use case is important as juju-deployer is used for validating bundles, without actually deploying them. If a user has a model/environment configured, it works fine. But in a CI scenario where there will be no model or controller when doing bundle and charm config validation.
## With Juju 1.25.x:
(mojo) root@foo:~/openstack-charm-testing# juju-deployer -vd next.yaml -b
Traceback (most recent call last):
File "/root/bot-control/tools/mojo-openstack/.tox/mojo/bin/juju-deployer", line 11, in <module>
sys.exit(main())
File "/root/bot-control/tools/mojo-openstack/.tox/mojo/local/lib/python2.7/site-packages/deployer/cli.py", line 140, in main
run()
File "/root/bot-control/tools/mojo-openstack/.tox/mojo/local/lib/python2.7/site-packages/deployer/cli.py", line 163, in run
env_name = get_env_name(options.juju_env)
File "/root/bot-control/tools/mojo-openstack/.tox/mojo/local/lib/python2.7/site-packages/deployer/utils.py", line 402, in get_env_name
with open(os.path.join(juju_home, 'environments.yaml')) as fh:
IOError: [Errno 2] No such file or directory: '/root/.juju/environments.yaml'
The following use case is important as juju-deployer is used for validating bundles, without actually deploying them. If a user has a model/environment configured, it works fine. But in a CI scenario where there will be no model or controller when doing bundle and charm config validation.
## With Juju 1.25.x: ~/openstack- charm-testing# juju-deployer -vd next.yaml -b bot-control/ tools/mojo- openstack/ .tox/mojo/ bin/juju- deployer" , line 11, in <module> exit(main( )) bot-control/ tools/mojo- openstack/ .tox/mojo/ local/lib/ python2. 7/site- packages/ deployer/ cli.py" , line 140, in main bot-control/ tools/mojo- openstack/ .tox/mojo/ local/lib/ python2. 7/site- packages/ deployer/ cli.py" , line 163, in run name(options. juju_env) bot-control/ tools/mojo- openstack/ .tox/mojo/ local/lib/ python2. 7/site- packages/ deployer/ utils.py" , line 402, in get_env_name path.join( juju_home, 'environments. yaml')) as fh: .juju/environme nts.yaml'
(mojo) root@foo:
Traceback (most recent call last):
File "/root/
sys.
File "/root/
run()
File "/root/
env_name = get_env_
File "/root/
with open(os.
IOError: [Errno 2] No such file or directory: '/root/
-
## With Juju 2.1.x: ~/openstack- charm-testing# juju-deployer -vd next.yaml -b
(mojo) root@foo:
2017-04-03 22:45:38 [ERROR] deployer.utils: Command (juju switch) Output:
ERROR no currently specified model
2017-04-03 22:45:38 [INFO] deployer.cli: Deployment stopped. run time: 0.03