How to create ansible charm in juju

The name of the pictureThe name of the pictureThe name of the pictureClash 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.










share|improve this question



























    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.










    share|improve this question

























      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.










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 3 at 11:51









      Arronical

      12.6k84489




      12.6k84489










      asked Apr 3 at 11:39









      Achyuth Kumar Karanam

      83




      83




















          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.






          share|improve this answer




















          • 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










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          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






























          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.






          share|improve this answer




















          • 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














          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.






          share|improve this answer




















          • 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












          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.






          share|improve this answer












          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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
















          • 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

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          Trouble downloading packages list due to a “Hash sum mismatch” error

          How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

          Cutting all the characters after the last /