{"id":329310,"date":"2023-03-13T07:00:00","date_gmt":"2023-03-13T07:00:00","guid":{"rendered":"http:\/\/itteacheritfreelance.hk\/wordpress\/?guid=1aabd16a0b424aaca35167a09e7a4e9e"},"modified":"2023-03-13T07:00:00","modified_gmt":"2023-03-13T07:00:00","slug":"how-to-use-automation-controller-to-install-ms-sql","status":"publish","type":"post","link":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2023\/03\/13\/how-to-use-automation-controller-to-install-ms-sql\/","title":{"rendered":"How to use automation controller\u00a0to install MS SQL"},"content":{"rendered":"<p class=\"syndicated-attribution\"><meta name= \\\"keywords \\\" content= \\\"\u96fb\u5b50\u8a08\u7b97\u6a5f, \u6559\u80b2, IT \u96fb\u8166\u73ed,\u96fb\u8166\u88dc\u7fd2\uff0c \u96fb\u8166\u73ed\uff0c \u5bb6\u6559\uff0c \u79c1\u4eba\u8001\u5e2b\uff0c \u8cc7\u8a0a\u6280\u8853\uff0c \u7a0b\u5e8f\u8a2d\u8a08\uff0c \u96fb\u5b50\u8a08\u7b97\u6a5f\uff0c \u904a\u6232\uff0c \u860b\u679c\uff0c \u96fb\u5f71\uff0c \u8a08\u7b97\u6a5f\uff0c\u7de8\u78bc\uff0c Java\uff0c C\/C++\uff0c JavaScript\uff0c PHP\uff0c HTML\uff0c CSS\uff0c MySQL\uff0c mobile\uff0c Android\uff0c \u52d5\u6f2b\uff0c Python\uff0c teacher\uff0c \u88dc\u7fd2\uff0c \u96fb\u8166\u88dc\u7fd2 \u8cc7\u8a0a, \u7535\u5b50\u8ba1\u7b97\u673a, IT ,Game, apple, movie, Computer,student,Java,\u6559\u80b2, ,\u5b66\u751f, \u5b66\u4e60, learn, \u6559\u5b66,  Android, apple,anime, animation, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u8cc7\u8a0a\u79d1\u6280,Game, Jeu, Juego,Call Of Duty ,\u4f7f\u547d\u53ec\u559a , \u6e38\u620f, \u7535\u5b50\u6e38\u620f,, \u591a\u4eba\u7535\u5b50\u6e38\u620f, \u7f51\u7edc\u6e38\u620f\uff0conline\uff0conline game, \u624b\u673a\u6e38\u620f, mobile \\\"><\/p>\n<p><span>How to use automation controller\u00a0to install MS SQL<\/span><\/p>\n<p>The purpose of this article is to demonstrate how to create an execution environment with custom dependencies and how to execute Ansible playbooks using the automation controller&#8217;s GUI, a component of <a href=\"https:\/\/developers.redhat.com\/products\/ansible\/overview\">Red Hat Ansible Automation Platform<\/a>. For this article, we will use Ansible Roles to install Microsoft SQL on <a href=\"https:\/\/developers.redhat.com\/products\/rhel\/overview\">Red Hat Enterprise Linux 8<\/a>.<\/p>\n<p>Make sure you have the <a href=\"https:\/\/developers.redhat.com\/products\/ansible\/download\">Ansible Automation Platform<\/a> installed on your machine before you begin. For more information about Ansible Automation Platform installation, please refer to our previous article, <a href=\"https:\/\/developers.redhat.com\/articles\/2023\/01\/01\/how-install-red-hat-ansible-automation-platform-rhel-9#\">How to install Red Hat Ansible Automation Platform on RHEL 9<\/a>. Follow these five steps to complete this demonstration.<\/p>\n<h2>Step 1. Setting up the automation\u00a0execution environment<\/h2>\n<p>Automation execution environments provide a defined, consistent, and portable environment for executing automation jobs. Unlike legacy virtual environments, automation execution environments are <a href=\"http:\/\/developers.redhat.com\/topics\/linux\">Linux<\/a> <a href=\"https:\/\/developers.redhat.com\/topics\/containers\">container<\/a> images that make it possible to incorporate system-level dependencies and collection-based content. Each automation execution environment allows you to have a customized image to run jobs, and each of them contains only what you need when running the job.<\/p>\n<p>There are dependencies for the automation execution environment, such as <a href=\"https:\/\/developers.redhat.com\/topics\/python\">Python<\/a> 3 and Podman. Make sure these tools are installed. We have provided instructions for installing and using Podman in this <a href=\"https:\/\/developers.redhat.com\/videos\/youtube\/bJDI_QuXeCE\">video<\/a>.<\/p>\n<p>Before you can complete any of the following tasks, you must create a registry <a href=\"https:\/\/access.redhat.com\/terms-based-registry\/\">service account<\/a>. To log in, open up your terminal and type the following commands:<\/p>\n<pre>\n<code class=\"language-bash\">podman login registry.redhat.io\nUsername: {REGISTRY-SERVICE-ACCOUNT-USERNAME}\nPassword: {REGISTRY-SERVICE-ACCOUNT-PASSWORD}\nLogin Succeeded!<\/code><\/pre>\n<p>Once we are successfully logged in, we need to create a container image by using a <strong>Containerfile<\/strong> containing the following context:<\/p>\n<pre>\n<code class=\"language-bash\">\u200b\u200b\u200b\u200b\u200b\u200b\u200bFROM registry.redhat.io\/ansible-automation-platform-22\/ee-29-rhel8:latest\n\nRUN ansible-galaxy collection install microsoft.sql<\/code><\/pre>\n<p>To build an image using Podman, enter the following:<\/p>\n<pre>\n<code class=\"language-bash\">\u200b\u200b\u200b\u200b\u200b\u200b\u200bpodman build -t <image-name>.<\/code><\/pre>\n<p>The image should be pushed into the container image registry. Log in to the private container image registry using the command &#8216;podman login&#8217; before pushing.<\/p>\n<pre>\n<code class=\"language-bash\">podman push <image-name><\/code><\/pre>\n<p>Add the image name in the automation execution environment, as shown in Figure 1.<\/p>\n<figure class=\"align-center\" role=\"group\">\n<div class=\"rhd-c-figure\">\n<article class=\"media media--type-image media--view-mode-article-content\">\n<div class=\"field field--name-image field--type-image field--label-hidden field__items\">\n  <a href=\"https:\/\/developers.redhat.com\/sites\/default\/files\/1_0.png\" data-featherlight=\"image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/developers.redhat.com\/sites\/default\/files\/styles\/article_floated\/public\/1_0.png?itok=mgnWbc_Q\" width=\"600\" height=\"293\" alt=\"The edit details section of the Execution Environment page in Ansible Automation Platform.\" typeof=\"foaf:Image\" \/><\/a>\n<\/div>\n<div class=\"field field--name-field-caption field--type-string field--label-hidden field__items\">\n<div class=\"rhd-c-caption field__item\">Figure 1: The Execution Environment page.<\/div>\n<\/div>\n<\/article>\n<\/div><figcaption class=\"rhd-c-caption\"><\/figcaption><\/figure>\n<p>\u00a0<\/p>\n<h2>Step\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u00a02. Set up the inventory<\/h2>\n<p>An inventory is a collection of hosts against which jobs may be launched. To create inventory in Ansible Automation Platform, follow these steps and refer to Figure 2:<\/p>\n<ol>\n<li aria-level=\"1\">Select the inventory from the left menu.<\/li>\n<li aria-level=\"1\">Click on <strong>add<\/strong>.<\/li>\n<li aria-level=\"1\">Select <strong>add inventory<\/strong>.<\/li>\n<li aria-level=\"1\">Give a name to the inventory and\u00a0save it.<\/li>\n<li aria-level=\"1\">Select the hosts from inventories and click\u00a0<strong>add hosts<\/strong>.<\/li>\n<li aria-level=\"1\">Give the targeted server IP or name and save it.<\/li>\n<\/ol>\n<figure class=\"align-center\" role=\"group\">\n<div class=\"rhd-c-figure\">\n<article class=\"media media--type-image media--view-mode-article-content\">\n<div class=\"field field--name-image field--type-image field--label-hidden field__items\">\n  <a href=\"https:\/\/developers.redhat.com\/sites\/default\/files\/2_4.png\" data-featherlight=\"image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/developers.redhat.com\/sites\/default\/files\/styles\/article_floated\/public\/2_4.png?itok=mWv_pWQN\" width=\"600\" height=\"217\" alt=\"The Inventory page in Ansible Automation Platform.\" typeof=\"foaf:Image\" \/><\/a>\n<\/div>\n<div class=\"field field--name-field-caption field--type-string field--label-hidden field__items\">\n<div class=\"rhd-c-caption field__item\">Figure 2: The Inventory page.<\/div>\n<\/div>\n<\/article>\n<\/div><figcaption class=\"rhd-c-caption\"><\/figcaption><\/figure>\n<p>\u00a0<\/p>\n<h2>Step 3. Set up the credentials<\/h2>\n<p>To connect with the target server, we need credentials such as username, password, or ssh key. By using credentials, we can pass the required credentials during the playbook execution.<\/p>\n<p>Follow these steps and refer to Figure 3:<\/p>\n<ol>\n<li aria-level=\"1\">Select the credentials from the left menu.<\/li>\n<li aria-level=\"1\">Click on new credentials and\u00a0select Machine credentials type.<\/li>\n<li aria-level=\"1\">Add your username, password, or ssh key in the corresponding\u00a0fields.<\/li>\n<\/ol>\n<figure class=\"align-center\" role=\"group\">\n<div class=\"rhd-c-figure\">\n<article class=\"media media--type-image media--view-mode-article-content\">\n<div class=\"field field--name-image field--type-image field--label-hidden field__items\">\n  <a href=\"https:\/\/developers.redhat.com\/sites\/default\/files\/3_6.png\" data-featherlight=\"image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/developers.redhat.com\/sites\/default\/files\/styles\/article_floated\/public\/3_6.png?itok=QJ4O8qnN\" width=\"600\" height=\"219\" alt=\"The credentials page in Ansible Automation Platform.\" typeof=\"foaf:Image\" \/><\/a>\n<\/div>\n<div class=\"field field--name-field-caption field--type-string field--label-hidden field__items\">\n<div class=\"rhd-c-caption field__item\">Figure 3: The credentials page.<\/div>\n<\/div>\n<\/article>\n<\/div><figcaption class=\"rhd-c-caption\"><\/figcaption><\/figure>\n<p>\u00a0<\/p>\n<h2>Step 4. Configuring a project<\/h2>\n<p>A project is a logical collection of Ansible Playbooks represented in the controller. You can manage playbooks and playbook directories\u00a0on your controller server either manually or by using a source code management (SCM) system such as Git, Subversion, or Mercurial supported by the controller.<\/p>\n<p>Follow these steps to create a project and refer to Figure 4:<\/p>\n<ol>\n<li aria-level=\"1\">Create a new project for our git repository from the left menu.<\/li>\n<li aria-level=\"1\">Click on\u00a0the <strong>+<\/strong> icon in the right corner.<\/li>\n<li aria-level=\"1\">Give the project a name.<\/li>\n<li aria-level=\"1\">Select your organization (or choose <strong>Default<\/strong>).<\/li>\n<li aria-level=\"1\">Select the SCM TYPE (GIT in our case).<\/li>\n<li aria-level=\"1\">Add RESOURCE DETAILS\n<ul>\n<li aria-level=\"2\">SCM <a href=\"https:\/\/github.com\/redhat-developer-demos\/MicrosoftSQL-AAP-on-RHEL\">URL<\/a><\/li>\n<li aria-level=\"2\">SCM BRANCH(main)<\/li>\n<li aria-level=\"2\">SCM CREDENTIAL<\/li>\n<\/ul>\n<\/li>\n<li aria-level=\"2\">Save it.<\/li>\n<\/ol>\n<figure class=\"align-center\" role=\"group\">\n<div class=\"rhd-c-figure\">\n<article class=\"media media--type-image media--view-mode-article-content\">\n<div class=\"field field--name-image field--type-image field--label-hidden field__items\">\n  <a href=\"https:\/\/developers.redhat.com\/sites\/default\/files\/4_3.png\" data-featherlight=\"image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/developers.redhat.com\/sites\/default\/files\/styles\/article_floated\/public\/4_3.png?itok=RGZpqYlc\" width=\"600\" height=\"298\" alt=\"The Project page of Ansible Automation Platform.\" typeof=\"foaf:Image\" \/><\/a>\n<\/div>\n<div class=\"field field--name-field-caption field--type-string field--label-hidden field__items\">\n<div class=\"rhd-c-caption field__item\">Figure 4: The Project page.<\/div>\n<\/div>\n<\/article>\n<\/div><figcaption class=\"rhd-c-caption\"><\/figcaption><\/figure>\n<p>\u00a0<\/p>\n<h2>Step 5. Configuring templates<\/h2>\n<p><a href=\"https:\/\/docs.ansible.com\/automation-controller\/latest\/html\/userguide\/glossary.html#term-Job-Template\">Templates<\/a> define and set parameters for running jobs. A template is more like a blueprint where all of the dependencies are defined, such as inventory, projects, credentials, etc.<\/p>\n<p>Follow these steps to create a template to execute the job for us (see Figure 5):<\/p>\n<ol>\n<li aria-level=\"1\">From the left menu, select templates and create a new template.<\/li>\n<li aria-level=\"1\">Click on + icon from the right corner and select the Job template.<\/li>\n<li aria-level=\"1\">Give the template a name.<\/li>\n<li aria-level=\"1\">Select the project and playbook you want to run in the template.<\/li>\n<li aria-level=\"1\">Select <a href=\"https:\/\/github.com\/redhat-developer-demos\/MicrosoftSQL-AAP-on-RHEL\/blob\/main\/microsoft_sql_playbook.yaml\">microsoft_sql_playbook.yaml<\/a> playbook.<\/li>\n<li aria-level=\"1\">Select the execution environment which you created previously.<\/li>\n<\/ol>\n<pre>\n<code class=\"language-bash\">---\n\n- hosts: dev\n\n\u00a0 collections:\n\u00a0 - microsoft.sql\n\n\u00a0 vars:\n\u00a0 \u00a0 mssql_accept_microsoft_odbc_driver_17_for_sql_server_eula: true\n\u00a0 \u00a0 mssql_accept_microsoft_cli_utilities_for_sql_server_eula: true\n\u00a0 \u00a0 mssql_accept_microsoft_sql_server_standard_eula: true\n\u00a0 \u00a0 mssql_password: \"YourP@ssw0rd\"\n\u00a0 \u00a0 mssql_edition: Evaluation\n\u00a0 \u00a0 mssql_enable_sql_agent: true\n\u00a0 \u00a0 mssql_install_fts: true\n\u00a0 \u00a0 mssql_install_powershell: true\n\u00a0 \u00a0 mssql_tune_for_fua_storage: true\n\u00a0 roles:\n\u00a0 \u00a0 - microsoft.sql.server\u200b<\/code><\/pre>\n<figure class=\"align-center\" role=\"group\">\n<div class=\"rhd-c-figure\">\n<article class=\"media media--type-image media--view-mode-article-content\">\n<div class=\"field field--name-image field--type-image field--label-hidden field__items\">\n  <a href=\"https:\/\/developers.redhat.com\/sites\/default\/files\/5_5.png\" data-featherlight=\"image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/developers.redhat.com\/sites\/default\/files\/styles\/article_floated\/public\/5_5.png?itok=uRgIOScv\" width=\"600\" height=\"297\" alt=\"The templates page in Ansible Automation Platform.\" typeof=\"foaf:Image\" \/><\/a>\n<\/div>\n<div class=\"field field--name-field-caption field--type-string field--label-hidden field__items\">\n<div class=\"rhd-c-caption field__item\">Figure 5: The Templates page.<\/div>\n<\/div>\n<\/article>\n<\/div><figcaption class=\"rhd-c-caption\"><\/figcaption><\/figure>\n<p class=\"Indent1\">7. \u200b\u200b\u200b\u200b\u200b\u200b\u200bLaunch it (Figure 6).<\/p>\n<figure class=\"align-center\" role=\"group\">\n<div class=\"rhd-c-figure\">\n<article class=\"media media--type-image media--view-mode-article-content\">\n<div class=\"field field--name-image field--type-image field--label-hidden field__items\">\n  <a href=\"https:\/\/developers.redhat.com\/sites\/default\/files\/6_2.jpg\" data-featherlight=\"image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/developers.redhat.com\/sites\/default\/files\/styles\/article_floated\/public\/6_2.jpg?itok=5dhT1dcv\" width=\"600\" height=\"298\" alt=\"After launching, this page shows the output of a successful installation of MicrosoftSQL server.\" typeof=\"foaf:Image\" \/><\/a>\n<\/div>\n<div class=\"field field--name-field-caption field--type-string field--label-hidden field__items\">\n<div class=\"rhd-c-caption field__item\">Figure 6: After launching, a successful installation of MicrosoftSQL server.<\/div>\n<\/div>\n<\/article>\n<\/div><figcaption class=\"rhd-c-caption\"><\/figcaption><\/figure>\n<p>\u00a0<\/p>\n<h2>Continue your automation journey with Ansible<\/h2>\n<p><a href=\"https:\/\/developers.redhat.com\/products\/ansible\/getting-started\">Get started<\/a> with the Ansible Automation Platform by exploring <a href=\"https:\/\/developers.redhat.com\/products\/ansible\/getting-started\">interactive labs<\/a>. Ansible Automation Platform is also available as a managed offering on<a href=\"https:\/\/www.redhat.com\/en\/technologies\/management\/ansible\/azure\"> Microsoft Azure<\/a> and as a self-managed offering on <a href=\"https:\/\/www.redhat.com\/en\/technologies\/management\/ansible\/aws\">AWS<\/a>.<\/p>\n<p><span><span lang=\"\" about=\"https:\/\/developers.redhat.com\/user\/746945\" typeof=\"schema:Person\" property=\"schema:name\" datatype=\"\" xml:lang=\"\">narathod@redhat.com<\/span><\/span><br \/>\n<span>Mon, 03\/13\/2023 &#8211; 07:00<\/span><br \/>\n<a href=\"https:\/\/developers.redhat.com\/author\/nagesh-rathod\" hreflang=\"en\">Nagesh Rathod<\/a><\/p>\n\n<p class=\"syndicated-attribution\"><figure class= \\\"wp-block-image alignnone \\\"><img src= \\\"http:\/\/itteacheritfreelance.hk\/test\/wordpress\/wp-content\/uploads\/2016\/05\/logo2-2.png\\\" alt=\\\"IT\u96fb\u8166\u88dc\u7fd2 java\u88dc\u7fd2 \u70ba\u5927\u5bb6\u914d\u5c0d\u96fb\u8166\u88dc\u7fd2,IT freelance, \u79c1\u4eba\u8001\u5e2b, PHP\u88dc\u7fd2,CSS\u88dc\u7fd2,XML,Java\u88dc\u7fd2,MySQL\u88dc\u7fd2,graphic design\u88dc\u7fd2,\u4e2d\u5c0f\u5b78ICT\u88dc\u7fd2,\u4e00\u5c0d\u4e00\u79c1\u4eba\u88dc\u7fd2\u548cFreelance\u81ea\u7531\u5de5\u4f5c\u914d\u5c0d\u3002\\\"\/><figcaption>\u7acb\u523b\u8a3b\u518a\u53ca\u5831\u540d\u96fb\u8166\u88dc\u7fd2\u8ab2\u7a0b\u5427!<\/figcaption><\/figure>\r\n<\/br>Find A Teacher Form:\r\n<\/br>https:\/\/docs.google.com\/forms\/d\/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ\/viewform?edit_requested=true#responses\r\n<\/br><\/br>Email:\r\n<\/br>public1989two@gmail.com<br><br><br><br><br><br><br>\r\n<a href=www.itsec.hk style=color:#FFFFFF;>www.itsec.hk<\/a><br>\r\n<a href=\\\"www.itsec.vip\\\" style=color:#FFFFFF;>www.itsec.vip<\/a><br>\r\n<a href=\\\"www.itseceu.uk\\\" style=color:#FFFFFF;>www.itseceu.uk<\/a><br><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>How to use automation controller\u00a0to install MS SQL<br \/>\nThe purpose of this article is to demonstrate how to create an execution environment with custom dependencies and how to execute Ansible playbooks using the automation controller&#8217;s GUI, a component of &#8230;<\/p>\n<\/div>","protected":false},"author":2033,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"How to use automation controller\u00a0to install MS SQL - ITTeacherITFreelance.hk","description":"How to use automation controller\u00a0to install MS SQL The purpose of this article is to demonstrate how to create an execution environment with custom dependencies"},"footnotes":""},"categories":[10700],"tags":[],"_links":{"self":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329310"}],"collection":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/2033"}],"replies":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=329310"}],"version-history":[{"count":1,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329310\/revisions"}],"predecessor-version":[{"id":329311,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329310\/revisions\/329311"}],"wp:attachment":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=329310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=329310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=329310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}