how to tell cloud formation init it shall use a specific repository by installing yum packages










2















Im using AWS::CloudFormation::Init to deploy services and packages within a AWS EC2-Instance. By default, Cloud Formation ist using AWS's repository which installs old versions like PHP 5.4.16 in my case. I told cfn-init to install remi and epel repositories but it seams I have to tell yum the same. In a bash I would do this like:



sudo yum --enablerepo=remi,remi-php71 install httpd php php-common


Sure, I could do the same in the UserData section as well but want to avoid as long as there's no way in configSets possible.



"install_apache2": {
"packages":
"rpm":
"remi" : "http://rpms.famillecollet.com/enterprise/remi-release-7.rpm",
"epel" : "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
,
"yum":
"php": ,
"php-mysql": ,
"php-mcrypt": ,
"php-gd": ,
"php-pear": ,
"httpd": ,
"nano": ,
"git":

,


here ist a short cut from my cfn-init-cmd.log:



P7691 [INFO] ===============================================================================
P7691 [INFO] Package Arch Version Repository Size
P7691 [INFO] ===============================================================================
P7691 [INFO] Installing:
P7691 [INFO] git x86_64 1.8.3.1-20.el7 rhui-REGION-rhel-server-releases 4.4 M
P7691 [INFO] httpd x86_64 2.4.6-88.el7 rhui-REGION-rhel-server-releases 1.2 M
P7691 [INFO] nano x86_64 2.3.1-10.el7 rhui-REGION-rhel-server-releases 440 k
P7691 [INFO] php x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 1.4 M
P7691 [INFO] php-gd x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 128 k
P7691 [INFO] php-mcrypt x86_64 5.4.16-7.el7 epel 20 k
P7691 [INFO] php-mysql x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 102 k
P7691 [INFO] php-pear noarch 1:1.9.4-21.el7 rhui-REGION-rhel-server-releases 357 k









share|improve this question


























    2















    Im using AWS::CloudFormation::Init to deploy services and packages within a AWS EC2-Instance. By default, Cloud Formation ist using AWS's repository which installs old versions like PHP 5.4.16 in my case. I told cfn-init to install remi and epel repositories but it seams I have to tell yum the same. In a bash I would do this like:



    sudo yum --enablerepo=remi,remi-php71 install httpd php php-common


    Sure, I could do the same in the UserData section as well but want to avoid as long as there's no way in configSets possible.



    "install_apache2": {
    "packages":
    "rpm":
    "remi" : "http://rpms.famillecollet.com/enterprise/remi-release-7.rpm",
    "epel" : "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
    ,
    "yum":
    "php": ,
    "php-mysql": ,
    "php-mcrypt": ,
    "php-gd": ,
    "php-pear": ,
    "httpd": ,
    "nano": ,
    "git":

    ,


    here ist a short cut from my cfn-init-cmd.log:



    P7691 [INFO] ===============================================================================
    P7691 [INFO] Package Arch Version Repository Size
    P7691 [INFO] ===============================================================================
    P7691 [INFO] Installing:
    P7691 [INFO] git x86_64 1.8.3.1-20.el7 rhui-REGION-rhel-server-releases 4.4 M
    P7691 [INFO] httpd x86_64 2.4.6-88.el7 rhui-REGION-rhel-server-releases 1.2 M
    P7691 [INFO] nano x86_64 2.3.1-10.el7 rhui-REGION-rhel-server-releases 440 k
    P7691 [INFO] php x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 1.4 M
    P7691 [INFO] php-gd x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 128 k
    P7691 [INFO] php-mcrypt x86_64 5.4.16-7.el7 epel 20 k
    P7691 [INFO] php-mysql x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 102 k
    P7691 [INFO] php-pear noarch 1:1.9.4-21.el7 rhui-REGION-rhel-server-releases 357 k









    share|improve this question
























      2












      2








      2


      1






      Im using AWS::CloudFormation::Init to deploy services and packages within a AWS EC2-Instance. By default, Cloud Formation ist using AWS's repository which installs old versions like PHP 5.4.16 in my case. I told cfn-init to install remi and epel repositories but it seams I have to tell yum the same. In a bash I would do this like:



      sudo yum --enablerepo=remi,remi-php71 install httpd php php-common


      Sure, I could do the same in the UserData section as well but want to avoid as long as there's no way in configSets possible.



      "install_apache2": {
      "packages":
      "rpm":
      "remi" : "http://rpms.famillecollet.com/enterprise/remi-release-7.rpm",
      "epel" : "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
      ,
      "yum":
      "php": ,
      "php-mysql": ,
      "php-mcrypt": ,
      "php-gd": ,
      "php-pear": ,
      "httpd": ,
      "nano": ,
      "git":

      ,


      here ist a short cut from my cfn-init-cmd.log:



      P7691 [INFO] ===============================================================================
      P7691 [INFO] Package Arch Version Repository Size
      P7691 [INFO] ===============================================================================
      P7691 [INFO] Installing:
      P7691 [INFO] git x86_64 1.8.3.1-20.el7 rhui-REGION-rhel-server-releases 4.4 M
      P7691 [INFO] httpd x86_64 2.4.6-88.el7 rhui-REGION-rhel-server-releases 1.2 M
      P7691 [INFO] nano x86_64 2.3.1-10.el7 rhui-REGION-rhel-server-releases 440 k
      P7691 [INFO] php x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 1.4 M
      P7691 [INFO] php-gd x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 128 k
      P7691 [INFO] php-mcrypt x86_64 5.4.16-7.el7 epel 20 k
      P7691 [INFO] php-mysql x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 102 k
      P7691 [INFO] php-pear noarch 1:1.9.4-21.el7 rhui-REGION-rhel-server-releases 357 k









      share|improve this question














      Im using AWS::CloudFormation::Init to deploy services and packages within a AWS EC2-Instance. By default, Cloud Formation ist using AWS's repository which installs old versions like PHP 5.4.16 in my case. I told cfn-init to install remi and epel repositories but it seams I have to tell yum the same. In a bash I would do this like:



      sudo yum --enablerepo=remi,remi-php71 install httpd php php-common


      Sure, I could do the same in the UserData section as well but want to avoid as long as there's no way in configSets possible.



      "install_apache2": {
      "packages":
      "rpm":
      "remi" : "http://rpms.famillecollet.com/enterprise/remi-release-7.rpm",
      "epel" : "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
      ,
      "yum":
      "php": ,
      "php-mysql": ,
      "php-mcrypt": ,
      "php-gd": ,
      "php-pear": ,
      "httpd": ,
      "nano": ,
      "git":

      ,


      here ist a short cut from my cfn-init-cmd.log:



      P7691 [INFO] ===============================================================================
      P7691 [INFO] Package Arch Version Repository Size
      P7691 [INFO] ===============================================================================
      P7691 [INFO] Installing:
      P7691 [INFO] git x86_64 1.8.3.1-20.el7 rhui-REGION-rhel-server-releases 4.4 M
      P7691 [INFO] httpd x86_64 2.4.6-88.el7 rhui-REGION-rhel-server-releases 1.2 M
      P7691 [INFO] nano x86_64 2.3.1-10.el7 rhui-REGION-rhel-server-releases 440 k
      P7691 [INFO] php x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 1.4 M
      P7691 [INFO] php-gd x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 128 k
      P7691 [INFO] php-mcrypt x86_64 5.4.16-7.el7 epel 20 k
      P7691 [INFO] php-mysql x86_64 5.4.16-46.el7 rhui-REGION-rhel-server-releases 102 k
      P7691 [INFO] php-pear noarch 1:1.9.4-21.el7 rhui-REGION-rhel-server-releases 357 k






      amazon-web-services amazon-cloudformation






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 14 '18 at 10:34









      RafaelRafael

      111




      111






















          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298127%2fhow-to-tell-cloud-formation-init-it-shall-use-a-specific-repository-by-installin%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298127%2fhow-to-tell-cloud-formation-init-it-shall-use-a-specific-repository-by-installin%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          Node.js Script on GitHub Pages or Amazon S3

          Museum of Modern and Contemporary Art of Trento and Rovereto