How to create ansible charm in juju

Clash Royale CLAN TAG#URR8PPP up vote
0
down vote
favorite
I am trying to create my own charm using ansible. When I do that using "charm create" I get some errors as below:
root@charms:~/charms/precise# charm create -t ansible ansi
INFO: Generating charm for ansi in ./ansi
INFO: No ansi in apt cache; creating an empty charm instead.
INFO:root:Loading charm helper config from charm-helpers.yaml.
INFO:root:Checking out lp:charm-helpers to /tmp/tmpJbpY6C/charm-helpers.
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
Branched 790 revisions.
WARNING:root:Could not sync: core. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: fetch. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: contrib.ansible. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: contrib.templating.contexts. Neither a pyfile or directory, does it even exist?
root@charms:~/charms/precise#
I am using 2.3.4 version of juju and have latest versions of python and ansible installed.
root@charms:~# juju --version
2.3.4-xenial-amd64
root@charms:~#
I have also installed charm-tools package.
root@charms:~# dpkg -l | grep charm
ii charm 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2 amd64 Tool for publishing and maintaining Juju charms
ii charm-tools 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2 all Tools for maintaining Juju charms
ii gucharmap 1:3.18.2-1ubuntu1 amd64 Unicode character picker and font browser
ii libgucharmap-2-90-7:amd64 1:3.18.2-1ubuntu1 amd64 Unicode browser widget library (shared library)
ii python-libcharmstore 0.0.3-0ubuntu1 all Python library to access Juju charmstore data
ii python-theblues 0.3.7-0ubuntu1~ubuntu16.04.1~ppa2 all Python library for using the Juju charm store API
root@charms:~#
How do I get the missing pyfiles for core, fetch, contrib.ansible, contrib.templating.contexts?
Please help.
python juju
add a comment |Â
up vote
0
down vote
favorite
I am trying to create my own charm using ansible. When I do that using "charm create" I get some errors as below:
root@charms:~/charms/precise# charm create -t ansible ansi
INFO: Generating charm for ansi in ./ansi
INFO: No ansi in apt cache; creating an empty charm instead.
INFO:root:Loading charm helper config from charm-helpers.yaml.
INFO:root:Checking out lp:charm-helpers to /tmp/tmpJbpY6C/charm-helpers.
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
Branched 790 revisions.
WARNING:root:Could not sync: core. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: fetch. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: contrib.ansible. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: contrib.templating.contexts. Neither a pyfile or directory, does it even exist?
root@charms:~/charms/precise#
I am using 2.3.4 version of juju and have latest versions of python and ansible installed.
root@charms:~# juju --version
2.3.4-xenial-amd64
root@charms:~#
I have also installed charm-tools package.
root@charms:~# dpkg -l | grep charm
ii charm 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2 amd64 Tool for publishing and maintaining Juju charms
ii charm-tools 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2 all Tools for maintaining Juju charms
ii gucharmap 1:3.18.2-1ubuntu1 amd64 Unicode character picker and font browser
ii libgucharmap-2-90-7:amd64 1:3.18.2-1ubuntu1 amd64 Unicode browser widget library (shared library)
ii python-libcharmstore 0.0.3-0ubuntu1 all Python library to access Juju charmstore data
ii python-theblues 0.3.7-0ubuntu1~ubuntu16.04.1~ppa2 all Python library for using the Juju charm store API
root@charms:~#
How do I get the missing pyfiles for core, fetch, contrib.ansible, contrib.templating.contexts?
Please help.
python juju
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to create my own charm using ansible. When I do that using "charm create" I get some errors as below:
root@charms:~/charms/precise# charm create -t ansible ansi
INFO: Generating charm for ansi in ./ansi
INFO: No ansi in apt cache; creating an empty charm instead.
INFO:root:Loading charm helper config from charm-helpers.yaml.
INFO:root:Checking out lp:charm-helpers to /tmp/tmpJbpY6C/charm-helpers.
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
Branched 790 revisions.
WARNING:root:Could not sync: core. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: fetch. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: contrib.ansible. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: contrib.templating.contexts. Neither a pyfile or directory, does it even exist?
root@charms:~/charms/precise#
I am using 2.3.4 version of juju and have latest versions of python and ansible installed.
root@charms:~# juju --version
2.3.4-xenial-amd64
root@charms:~#
I have also installed charm-tools package.
root@charms:~# dpkg -l | grep charm
ii charm 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2 amd64 Tool for publishing and maintaining Juju charms
ii charm-tools 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2 all Tools for maintaining Juju charms
ii gucharmap 1:3.18.2-1ubuntu1 amd64 Unicode character picker and font browser
ii libgucharmap-2-90-7:amd64 1:3.18.2-1ubuntu1 amd64 Unicode browser widget library (shared library)
ii python-libcharmstore 0.0.3-0ubuntu1 all Python library to access Juju charmstore data
ii python-theblues 0.3.7-0ubuntu1~ubuntu16.04.1~ppa2 all Python library for using the Juju charm store API
root@charms:~#
How do I get the missing pyfiles for core, fetch, contrib.ansible, contrib.templating.contexts?
Please help.
python juju
I am trying to create my own charm using ansible. When I do that using "charm create" I get some errors as below:
root@charms:~/charms/precise# charm create -t ansible ansi
INFO: Generating charm for ansi in ./ansi
INFO: No ansi in apt cache; creating an empty charm instead.
INFO:root:Loading charm helper config from charm-helpers.yaml.
INFO:root:Checking out lp:charm-helpers to /tmp/tmpJbpY6C/charm-helpers.
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
Branched 790 revisions.
WARNING:root:Could not sync: core. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: fetch. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: contrib.ansible. Neither a pyfile or directory, does it even exist?
WARNING:root:Could not sync: contrib.templating.contexts. Neither a pyfile or directory, does it even exist?
root@charms:~/charms/precise#
I am using 2.3.4 version of juju and have latest versions of python and ansible installed.
root@charms:~# juju --version
2.3.4-xenial-amd64
root@charms:~#
I have also installed charm-tools package.
root@charms:~# dpkg -l | grep charm
ii charm 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2 amd64 Tool for publishing and maintaining Juju charms
ii charm-tools 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2 all Tools for maintaining Juju charms
ii gucharmap 1:3.18.2-1ubuntu1 amd64 Unicode character picker and font browser
ii libgucharmap-2-90-7:amd64 1:3.18.2-1ubuntu1 amd64 Unicode browser widget library (shared library)
ii python-libcharmstore 0.0.3-0ubuntu1 all Python library to access Juju charmstore data
ii python-theblues 0.3.7-0ubuntu1~ubuntu16.04.1~ppa2 all Python library for using the Juju charm store API
root@charms:~#
How do I get the missing pyfiles for core, fetch, contrib.ansible, contrib.templating.contexts?
Please help.
python juju
python juju
edited Apr 3 at 11:51
Arronical
12.6k84489
12.6k84489
asked Apr 3 at 11:39
Achyuth Kumar Karanam
83
83
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
To make a charm that uses ansible it is not required that you use the ansible template. you can just create a charm with the default template and add the ansible layer. How to do this can be found in this post. Make sure you are using the snap package of charm and remove the apt-package.
sudo apt-get purge charm
sudo snap install charm
charm create ansi
Now your charm will be created and you can start writing your code for the charm.
I am totally new to JUJU. Operationally, what would be the difference between "charm create -t ansible" and building a ansible layer?
â Achyuth Kumar Karanam
Apr 5 at 13:33
the template option will just create the basic components to start creating your charm and build it . On the juju solutions github I only found the reactive-python(default) and the reactive-bash. By using the Reactive framework, it is possible to then include the ansible layer. to get the functionality of ansible. At firts sight it looks like the ansible template is not supported any more in the latest charm tools. so using reactive python (or bash) is the only way to achieve it.
â SebastienPattyn
Apr 5 at 14:00
@AchyuthKumarKaranam did my solution work for you to create the charm?
â SebastienPattyn
Apr 6 at 14:03
when i use python as a template to create charm, I did not get the hooks.py file to proceed according to the doc link
â Achyuth Kumar Karanam
Apr 9 at 9:32
I wanted to demonstrate the behavior of ansible using juju charms. Can you suggest any playbooks or git repos.
â Achyuth Kumar Karanam
Apr 9 at 9:35
 |Â
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
To make a charm that uses ansible it is not required that you use the ansible template. you can just create a charm with the default template and add the ansible layer. How to do this can be found in this post. Make sure you are using the snap package of charm and remove the apt-package.
sudo apt-get purge charm
sudo snap install charm
charm create ansi
Now your charm will be created and you can start writing your code for the charm.
I am totally new to JUJU. Operationally, what would be the difference between "charm create -t ansible" and building a ansible layer?
â Achyuth Kumar Karanam
Apr 5 at 13:33
the template option will just create the basic components to start creating your charm and build it . On the juju solutions github I only found the reactive-python(default) and the reactive-bash. By using the Reactive framework, it is possible to then include the ansible layer. to get the functionality of ansible. At firts sight it looks like the ansible template is not supported any more in the latest charm tools. so using reactive python (or bash) is the only way to achieve it.
â SebastienPattyn
Apr 5 at 14:00
@AchyuthKumarKaranam did my solution work for you to create the charm?
â SebastienPattyn
Apr 6 at 14:03
when i use python as a template to create charm, I did not get the hooks.py file to proceed according to the doc link
â Achyuth Kumar Karanam
Apr 9 at 9:32
I wanted to demonstrate the behavior of ansible using juju charms. Can you suggest any playbooks or git repos.
â Achyuth Kumar Karanam
Apr 9 at 9:35
 |Â
show 2 more comments
up vote
1
down vote
accepted
To make a charm that uses ansible it is not required that you use the ansible template. you can just create a charm with the default template and add the ansible layer. How to do this can be found in this post. Make sure you are using the snap package of charm and remove the apt-package.
sudo apt-get purge charm
sudo snap install charm
charm create ansi
Now your charm will be created and you can start writing your code for the charm.
I am totally new to JUJU. Operationally, what would be the difference between "charm create -t ansible" and building a ansible layer?
â Achyuth Kumar Karanam
Apr 5 at 13:33
the template option will just create the basic components to start creating your charm and build it . On the juju solutions github I only found the reactive-python(default) and the reactive-bash. By using the Reactive framework, it is possible to then include the ansible layer. to get the functionality of ansible. At firts sight it looks like the ansible template is not supported any more in the latest charm tools. so using reactive python (or bash) is the only way to achieve it.
â SebastienPattyn
Apr 5 at 14:00
@AchyuthKumarKaranam did my solution work for you to create the charm?
â SebastienPattyn
Apr 6 at 14:03
when i use python as a template to create charm, I did not get the hooks.py file to proceed according to the doc link
â Achyuth Kumar Karanam
Apr 9 at 9:32
I wanted to demonstrate the behavior of ansible using juju charms. Can you suggest any playbooks or git repos.
â Achyuth Kumar Karanam
Apr 9 at 9:35
 |Â
show 2 more comments
up vote
1
down vote
accepted
up vote
1
down vote
accepted
To make a charm that uses ansible it is not required that you use the ansible template. you can just create a charm with the default template and add the ansible layer. How to do this can be found in this post. Make sure you are using the snap package of charm and remove the apt-package.
sudo apt-get purge charm
sudo snap install charm
charm create ansi
Now your charm will be created and you can start writing your code for the charm.
To make a charm that uses ansible it is not required that you use the ansible template. you can just create a charm with the default template and add the ansible layer. How to do this can be found in this post. Make sure you are using the snap package of charm and remove the apt-package.
sudo apt-get purge charm
sudo snap install charm
charm create ansi
Now your charm will be created and you can start writing your code for the charm.
answered Apr 4 at 8:49
SebastienPattyn
5681319
5681319
I am totally new to JUJU. Operationally, what would be the difference between "charm create -t ansible" and building a ansible layer?
â Achyuth Kumar Karanam
Apr 5 at 13:33
the template option will just create the basic components to start creating your charm and build it . On the juju solutions github I only found the reactive-python(default) and the reactive-bash. By using the Reactive framework, it is possible to then include the ansible layer. to get the functionality of ansible. At firts sight it looks like the ansible template is not supported any more in the latest charm tools. so using reactive python (or bash) is the only way to achieve it.
â SebastienPattyn
Apr 5 at 14:00
@AchyuthKumarKaranam did my solution work for you to create the charm?
â SebastienPattyn
Apr 6 at 14:03
when i use python as a template to create charm, I did not get the hooks.py file to proceed according to the doc link
â Achyuth Kumar Karanam
Apr 9 at 9:32
I wanted to demonstrate the behavior of ansible using juju charms. Can you suggest any playbooks or git repos.
â Achyuth Kumar Karanam
Apr 9 at 9:35
 |Â
show 2 more comments
I am totally new to JUJU. Operationally, what would be the difference between "charm create -t ansible" and building a ansible layer?
â Achyuth Kumar Karanam
Apr 5 at 13:33
the template option will just create the basic components to start creating your charm and build it . On the juju solutions github I only found the reactive-python(default) and the reactive-bash. By using the Reactive framework, it is possible to then include the ansible layer. to get the functionality of ansible. At firts sight it looks like the ansible template is not supported any more in the latest charm tools. so using reactive python (or bash) is the only way to achieve it.
â SebastienPattyn
Apr 5 at 14:00
@AchyuthKumarKaranam did my solution work for you to create the charm?
â SebastienPattyn
Apr 6 at 14:03
when i use python as a template to create charm, I did not get the hooks.py file to proceed according to the doc link
â Achyuth Kumar Karanam
Apr 9 at 9:32
I wanted to demonstrate the behavior of ansible using juju charms. Can you suggest any playbooks or git repos.
â Achyuth Kumar Karanam
Apr 9 at 9:35
I am totally new to JUJU. Operationally, what would be the difference between "charm create -t ansible" and building a ansible layer?
â Achyuth Kumar Karanam
Apr 5 at 13:33
I am totally new to JUJU. Operationally, what would be the difference between "charm create -t ansible" and building a ansible layer?
â Achyuth Kumar Karanam
Apr 5 at 13:33
the template option will just create the basic components to start creating your charm and build it . On the juju solutions github I only found the reactive-python(default) and the reactive-bash. By using the Reactive framework, it is possible to then include the ansible layer. to get the functionality of ansible. At firts sight it looks like the ansible template is not supported any more in the latest charm tools. so using reactive python (or bash) is the only way to achieve it.
â SebastienPattyn
Apr 5 at 14:00
the template option will just create the basic components to start creating your charm and build it . On the juju solutions github I only found the reactive-python(default) and the reactive-bash. By using the Reactive framework, it is possible to then include the ansible layer. to get the functionality of ansible. At firts sight it looks like the ansible template is not supported any more in the latest charm tools. so using reactive python (or bash) is the only way to achieve it.
â SebastienPattyn
Apr 5 at 14:00
@AchyuthKumarKaranam did my solution work for you to create the charm?
â SebastienPattyn
Apr 6 at 14:03
@AchyuthKumarKaranam did my solution work for you to create the charm?
â SebastienPattyn
Apr 6 at 14:03
when i use python as a template to create charm, I did not get the hooks.py file to proceed according to the doc link
â Achyuth Kumar Karanam
Apr 9 at 9:32
when i use python as a template to create charm, I did not get the hooks.py file to proceed according to the doc link
â Achyuth Kumar Karanam
Apr 9 at 9:32
I wanted to demonstrate the behavior of ansible using juju charms. Can you suggest any playbooks or git repos.
â Achyuth Kumar Karanam
Apr 9 at 9:35
I wanted to demonstrate the behavior of ansible using juju charms. Can you suggest any playbooks or git repos.
â Achyuth Kumar Karanam
Apr 9 at 9:35
 |Â
show 2 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1021577%2fhow-to-create-ansible-charm-in-juju%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password