{"id":7265,"date":"2024-11-18T18:51:18","date_gmt":"2024-11-18T16:51:18","guid":{"rendered":"https:\/\/blog.outscale.com\/?p=7265"},"modified":"2025-09-03T10:36:55","modified_gmt":"2025-09-03T08:36:55","slug":"how-to-deploy-codestral-on-outscales-sovereign-and-secure-infrastructure-2","status":"publish","type":"post","link":"https:\/\/blog.outscale.com\/en\/how-to-deploy-codestral-on-outscales-sovereign-and-secure-infrastructure-2\/","title":{"rendered":"How to deploy Codestral on OUTSCALE&#8217;s sovereign and secure infrastructure?"},"content":{"rendered":"<p><strong>Generative AI<\/strong> is playing an increasingly significant role in <strong>software development<\/strong>. By generating precise code snippets, automating testing, and simplifying documentation, these LLMs (Large Language Models) enhance developers&#8217; productivity while freeing up time for innovation.<\/p>\n<p>However, the rise of Generative AI raises a critical question: <strong>how can we ensure the sovereignty and security of the generated code?<\/strong><\/p>\n<h2 id=\"llm-and-asset-security\">LLM and Asset Security<\/h2>\n<p>Companies and institutions regularly handle sensitive data and codes, but using AI tools hosted on online platforms may expose these strategic assets to various risks.<\/p>\n<p>First, extraterritorial laws like the <strong>Cloud Act<\/strong> in the United States allow certain governments to request access to data stored within their jurisdictions, potentially compromising the confidentiality of critical information.<\/p>\n<p>Second, <strong>industrial espionage<\/strong> and cyberattacks increase the risk of intrusion, code theft, or even sabotage, particularly through <strong>supply chain attacks<\/strong>.<\/p>\n<p>To address these threats, organizations must consider solutions that combine the <strong>power of Generative AI<\/strong> with guarantees of <strong>security<\/strong>, <strong>data sovereignty<\/strong>, and <strong>intellectual property protection<\/strong>.<\/p>\n<h2 id=\"dassault-systemes-and-mistral-ai-partnership\">Dassault Syst\u00e8mes and Mistral AI Partnership<\/h2>\n<p>In July 2024, <a href=\"https:\/\/www.3ds.com\/newsroom\/press-releases\/dassault-systemes-and-mistral-ai-partner-offer-trusted-ai-powered-industry-grade-solutions-accelerate-generative-economy\">Dassault Syst\u00e8mes and Mistral AI announced a strategic partnership to deliver reliable industrial solutions based on artificial intelligence to accelerate the Generative Economy<\/a>. This partnership combines the virtual twin experiences and the sovereign Cloud infrastructure of OUTSCALE (Dassault Syst\u00e8mes) with the large language models (LLMs) from <a href=\"https:\/\/mistral.ai\/\">Mistral AI<\/a>.<\/p>\n<p>In this context, <strong>OUTSCALE has launched an LLM as a Service (LLMaaS) offering<\/strong>, specifically designed to enable rapid development of <strong>Generative AI use cases<\/strong>.<\/p>\n<p>This offering is the first to integrate Mistral AI models on a <strong>100% sovereign<\/strong>, <strong>secure Cloud qualified with SecNumCloud 3.2<\/strong>, ensuring top-tier performance while providing enhanced protection for sensitive data and intellectual property.<\/p>\n<h2 id=\"available-mistral-ai-models\">Available Mistral AI Models<\/h2>\n<p>&nbsp;<\/p>\n<div class=\"content-section\">\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-7064 aligncenter\" src=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-300x168.jpg\" alt=\"Available Mistral AI Models\" width=\"493\" height=\"276\" srcset=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-300x168.jpg 300w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-1024x574.jpg 1024w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-768x430.jpg 768w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-1536x861.jpg 1536w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-2048x1148.jpg 2048w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-1920x1076.jpg 1920w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-1170x656.jpg 1170w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/10\/Visuel-Annonce-LLMaaS-1-585x328.jpg 585w\" sizes=\"(max-width: 493px) 100vw, 493px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>As part of their partnership, OUTSCALE and Mistral AI offer a range of Artificial Intelligence models designed to meet the specific needs of companies and institutions.<\/p>\n<p>These models include <a href=\"https:\/\/en.outscale.com\/cloud-experience\/mistral-small\/\"><strong>Mistral Small<\/strong><\/a> and <a href=\"https:\/\/en.outscale.com\/cloud-experience\/codestral\/\"><strong>Codestral<\/strong><\/a>, integrated into the LLMaaS (Large Language Model as a Service) deployed on OUTSCALE\u2019s sovereign Cloud infrastructure.<\/p>\n<p>This offer allows organizations to fully leverage the capabilities of Generative AI, in a sovereign and secure environment.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-7231\" src=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Small-300x99.jpg\" alt=\"\" width=\"91\" height=\"30\" srcset=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Small-300x99.jpg 300w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Small-585x192.jpg 585w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Small.jpg 733w\" sizes=\"(max-width: 91px) 100vw, 91px\" \/><\/p>\n<h3 id=\"mistral-small-a-lightweight-and-versatile-model\">Mistral Small: A Lightweight and Versatile Model<\/h3>\n<p><strong>Mistral Small<\/strong> is designed to offer lightweight Generative AI solutions while optimizing resource consumption. Ideal for projects requiring speed and efficiency without compromising quality, it adapts to a wide range of tasks such as <strong>text generation<\/strong>, <strong>auto-completion<\/strong>, and <strong>data processing<\/strong> from simple instructions. Thanks to its reduced latency, Mistral Small is particularly well-suited for real-time applications or environments that require quick responses.<\/p>\n<p><strong>Mistral Small<\/strong> is effective for:<\/p>\n<ul>\n<li><strong>Conversational assistants:<\/strong> Provides rapid and accurate contextual assistance, ideal for smooth interactions.<\/li>\n<li><strong>Documentation and text analysis:<\/strong> A powerful tool to automate editing or synthesis tasks effectively.<\/li>\n<li><strong>Integration into web applications:<\/strong> Perfect for content management systems or customer service interfaces that require fast processing and lightweight handling.<\/li>\n<\/ul>\n<p>With <strong>Mistral Small<\/strong>, organizations benefit from a high-performance Generative AI model that optimizes their resources while ensuring complete confidentiality, thanks to <strong>OUTSCALE&#8217;s secure infrastructure<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-7233\" src=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Codestral-300x46.png\" alt=\"\" width=\"130\" height=\"20\" srcset=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Codestral-300x46.png 300w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Codestral-768x119.png 768w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Codestral-585x90.png 585w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Codestral.png 1024w\" sizes=\"(max-width: 130px) 100vw, 130px\" \/><\/p>\n<h3 id=\"mistral-codestral-a-powerful-ai-for-code-generation\">Codestral: A Powerful AI for Code Generation<\/h3>\n<p><strong>Codestral<\/strong> is an AI model specialized in <strong>code generation<\/strong>, designed for development teams looking to automate and optimize their programming processes.<\/p>\n<p>This model supports over <strong>80 programming languages<\/strong>, including <strong>Python<\/strong>, <strong>Java<\/strong>, and <strong>C++<\/strong>, and features an extended <strong>context window<\/strong> of 128,000 tokens, enabling code analysis and generation for large-scale projects.<\/p>\n<p><strong>Codestral<\/strong> is tailored to:<\/p>\n<ul>\n<li><strong>Code generation and completion:<\/strong> Responds to developers&#8217; instructions by producing code segments that adhere to best practices in each language.<\/li>\n<li><strong>Unit test creation:<\/strong> Automates test generation to ensure code robustness and reliability.<\/li>\n<li><strong>Configuration and orchestration:<\/strong> Can write configuration files for tools like Ansible, Kubernetes, or Terraform.<\/li>\n<\/ul>\n<p>In addition to its advanced features,<strong>\u00a0Codestral<\/strong> offers exceptional flexibility, particularly thanks to the OUTSCALE environment, which allows organizations to <strong>fully secure their data and sensitive code<\/strong>.<\/p>\n<p>This model is especially relevant for organizations handling confidential information, as it ensures that the data being processed never leaves OUTSCALE\u2019s sovereign infrastructure.<\/p>\n<\/div>\n<h2 id=\"outscale-offering\">OUTSCALE Offering<\/h2>\n<div class=\"content-section\">\n<p>The OUTSCALE offering is based on a robust infrastructure comprising <strong>a Virtual Machine (VM) instance specifically optimized for Mistral models<\/strong>. This instance is <strong>equipped with two L40 GPUs<\/strong>, delivering exceptional computational power for applications requiring intensive execution of Generative AI models.<\/p>\n<p>This infrastructure is deployed within a <strong>Virtual Private Cloud (VPC)<\/strong> in OUTSCALE&#8217;s <code>cloudgouv-eu-west-1<\/code> region, ensuring enhanced performance and security to meet the strict requirements of businesses and institutions. Notably, <strong>this region is SecNumCloud 3.2 qualified<\/strong>, reflecting adherence to the highest security standards. This qualification ensures that the infrastructure meets rigorous criteria for data protection and compliance with European regulations, providing businesses with complete peace of mind regarding the sovereignty and security of their hosted data.<\/p>\n<p>By combining these material and regional elements, OUTSCALE&#8217;s offering provides a secure Generative Artificial Intelligence solution, enabling organizations to fully leverage the advanced capabilities of Mistral AI models, while ensuring data sovereignty and confidentiality.<\/p>\n<\/div>\n<h2 id=\"how-to-proceed\">How to Proceed?<\/h2>\n<div class=\"content-section\">\n<h3 id=\"deploying-a-mistral-codestral-instance-from-outscale-marketplace\">Deploying a Codestral Instance from OUTSCALE Marketplace<\/h3>\n<p>Let\u2019s dive into a detailed tutorial on how to deploy a Codestral instance from <a href=\"https:\/\/marketplace.outscale.com\/\">OUTSCALE Marketplace<\/a> and use it with Visual Studio Code, enhanced by the <a href=\"https:\/\/www.continue.dev\/\">Continue extension<\/a>.<\/p>\n<ol>\n<li>Once logged into the platform, navigate to the Catalog and search for \u201cMISTRAL AI x OUTSCALE\u201d in the left-hand section, then click to view the related products. You will find two OMIs (OUTSCALE Machine Images) titled<strong>\u00a0Codestral<\/strong> and <strong>Mistral Small<\/strong>, illustrated in the image below.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7177 aligncenter\" src=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350.png\" alt=\"Searching for Mistral on OUTSCALE Marketplace\" width=\"494\" height=\"270\" srcset=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350.png 2880w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350-300x164.png 300w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350-1024x561.png 1024w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350-768x421.png 768w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350-1536x842.png 1536w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350-2048x1123.png 2048w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350-1920x1053.png 1920w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350-1170x641.png 1170w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.24.40-e1731677239350-585x321.png 585w\" sizes=\"(max-width: 494px) 100vw, 494px\" \/><\/p>\n<ol start=\"2\">\n<li>Click on <a href=\"https:\/\/marketplace.outscale.com\/partner\/org-6kdb7jx3\/product\/pro-xdwl6k6y\"><strong>Codestral<\/strong> <\/a> and you will be directed to the Bundle details page. You should see, as illustrated below, the contents of the package, including the <strong>Codestral model<\/strong> and the two Nvidia L40 GPUs.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7175 aligncenter\" src=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-300x169.png\" alt=\"Mistral Codestral Package Details\" width=\"474\" height=\"267\" srcset=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-300x169.png 300w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-1024x576.png 1024w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-768x432.png 768w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-1536x864.png 1536w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-2048x1152.png 2048w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-1920x1080.png 1920w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-1170x658.png 1170w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-14.26.06-585x329.png 585w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/p>\n<ol start=\"3\">\n<li>In the right-hand section, accept the terms and click \u201cProceed to Subscription.\u201d<\/li>\n<li>On the second screen, you\u2019ll need to provide your connection credentials (AK\/SK), and on the third, the VPC and Subnet you previously configured via Cockpit or Terraform infrastructure code.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7187 aligncenter\" src=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-300x162.png\" alt=\"Configuring Credentials and Network\" width=\"481\" height=\"260\" srcset=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-300x162.png 300w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-1024x552.png 1024w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-768x414.png 768w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-1536x828.png 1536w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-2048x1104.png 2048w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-1920x1035.png 1920w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-1170x631.png 1170w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.02.07-585x315.png 585w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><\/p>\n<ol start=\"4\">\n<li>Once the entered information is verified, click \u201cDeploy.\u201d After a few minutes, you will see the deployed VM in Cockpit.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7190 aligncenter\" src=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-300x161.png\" alt=\"Deployed VM in Cockpit\" width=\"488\" height=\"262\" srcset=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-300x161.png 300w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-1024x550.png 1024w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-768x412.png 768w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-1536x825.png 1536w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-2048x1100.png 2048w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-1920x1031.png 1920w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-1170x628.png 1170w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.03.33-585x314.png 585w\" sizes=\"(max-width: 488px) 100vw, 488px\" \/><\/p>\n<p>Attach a public IP address to access it.<\/p>\n<h3 id=\"using-mistral-codestral-with-visual-studio-code\">Using Codestral with Visual Studio Code<\/h3>\n<p>From a machine authorized to connect to the instance via security groups, install Visual Studio Code and, in the extensions, search for the <a href=\"https:\/\/www.continue.dev\/\">Continue extension<\/a> from the company of the same name.<\/p>\n<p>On the right, you should see an additional icon appear, as shown in the screenshot below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7194 aligncenter\" src=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-300x179.png\" alt=\"Continue Icon in Visual Studio Code\" width=\"453\" height=\"270\" srcset=\"https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-300x179.png 300w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-1024x612.png 1024w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-768x459.png 768w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-1536x917.png 1536w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-2048x1223.png 2048w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-1920x1147.png 1920w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-1170x699.png 1170w, https:\/\/blog.outscale.com\/wp-content\/uploads\/2024\/11\/Capture-de\u0301cran-2024-11-15-a\u0300-15.14.09-585x349.png 585w\" sizes=\"(max-width: 453px) 100vw, 453px\" \/><\/p>\n<p>At the bottom of the screen that appears, click the gear icon and add the<strong>\u00a0Codestral<\/strong> model to your project. In the [models] section, add the following information, replacing the IP address and model name if they differ:<\/p>\n<div id=\"cb1\" class=\"sourceCode\">\n<pre class=\"sourceCode yaml\"><code class=\"sourceCode yaml\">\r\n  \"models\":\r\n    {\r\n      \"title\": \"OSC-Mistral\",\r\n      \"model\": \"codestral-2405\",\r\n      \"apiBase\": \"http:\/\/xxx.xx.xx.xxx:5000\/v1\",\r\n      \"provider\": \"mistral\"\r\n    },\r\n  ...\r\n            <\/code><\/pre>\n<\/div>\n<p>If you wish to use it for auto-completion, look for the [tabAutocompleteModel] section as indicated below:<\/p>\n<div id=\"cb2\" class=\"sourceCode\">\n<pre class=\"sourceCode yaml\"><code class=\"sourceCode yaml\">\r\n  \"tabAutocompleteModel\":\r\n    {\r\n      \"title\": \"Tab Autocomplete Model\",\r\n      \"provider\": \"mistral\",\r\n      \"model\": \"codestral-2405\",\r\n      \"apiBase\": \"http:\/\/xxx.xx.xx.xxx:5000\/v1\"\r\n    },\r\n            <\/code><\/pre>\n<\/div>\n<p>That&#8217;s it; everything is ready for our test.<\/p>\n<h3 id=\"a-test\">A Test<\/h3>\n<p>I had fun submitting a prompt asking it to generate infrastructure code I am very familiar with: <strong>Ansible<\/strong>.<\/p>\n<pre class=\"plaintext\"><code>Generate an Ansible playbook to install Apache on Linux.\r\n\r\nGuidelines to follow:\r\n\r\n- Support multiple Linux families\r\n- Include the proper Apache package name to install based on the OS in a variables file\r\n- Ansible module names must be complete, e.g., ansible.builtin.apt\r\n- Use handlers to restart services if the service configuration is modified\r\n- Use true or false for boolean values\r\n- Provide the Nginx configuration in a template\r\n- Target hosts are machines in the webservers group\r\n- Provide the main playbook\r\n- Provide an example Jinja template for Apache with multiple variables\r\n- Provide variables files for Debian and RedHat families<\/code><\/pre>\n<p>The result:<\/p>\n<p>Here\u2019s a solution for your problem:<\/p>\n<h4>Playbook (main.yml):<\/h4>\n<div id=\"cb4\" class=\"sourceCode\">\n<pre class=\"sourceCode yaml\"><code class=\"sourceCode yaml\">\r\n- name: Install and configure Apache\r\n  hosts: webservers\r\n  become: true\r\n  vars_files:\r\n    - \"{{ ansible_os_family }}.yml\"\r\n  tasks:\r\n    - name: Install Apache\r\n      package:\r\n        name: \"{{ apache_package }}\"\r\n        state: present\r\n\r\n    - name: Copy Apache configuration file\r\n      template:\r\n        src: apache.conf.j2\r\n        dest: \/etc\/httpd\/conf\/httpd.conf\r\n      notify:\r\n        - Restart Apache\r\n  handlers:\r\n    - name: Restart Apache\r\n      service:\r\n        name: \"{{ apache_service }}\"\r\n        state: restarted\r\n            <\/code><\/pre>\n<\/div>\n<h4>Template (apache.conf.j2):<\/h4>\n<pre class=\"jinja\"><code>ServerRoot \"{{ apache_root }}\"\r\n\r\nListen {{ apache_port }}\r\n\r\n\r\n    AllowOverride none\r\n    Require all denied\r\n\r\n\r\nDocumentRoot \"{{ apache_document_root }}\"\r\n\r\n&lt;Directory \"{{ apache_document_root }}\"&gt;\r\n    Options Indexes FollowSymLinks\r\n    AllowOverride None\r\n    Require all granted\r\n<\/code><\/pre>\n<h4>Variables for Debian (debian.yml):<\/h4>\n<div id=\"cb6\" class=\"sourceCode\">\n<pre class=\"sourceCode yaml\"><code class=\"sourceCode yaml\">\r\napache_package: apache2\r\napache_service: apache2\r\napache_root: \/etc\/apache2\r\napache_port: 80\r\napache_document_root: \/var\/www\/html\r\n            <\/code><\/pre>\n<\/div>\n<h4>Variables for RedHat (RedHat.yml):<\/h4>\n<div id=\"cb7\" class=\"sourceCode\">\n<pre class=\"sourceCode yaml\"><code class=\"sourceCode yaml\">\r\napache_package: httpd\r\napache_service: httpd\r\napache_root: \/etc\/httpd\r\napache_port: 80\r\napache_document_root: \/var\/www\/html\r\n            <\/code><\/pre>\n<\/div>\n<p>I\u2019ll let you judge, but the result is truly impressive. It understood the instructions and followed them to the letter. It even provided examples of variable files for Debian and RedHat families, which is very practical.<\/p>\n<p>It also used handlers to restart services if the configuration is modified and used <code>true<\/code> or <code>false<\/code> for boolean values. Finally, it utilized a <code>Jinja<\/code> template for the Nginx configuration. Bravo!<\/p>\n<p>The prompt could still be improved by asking it to properly define the owner and permissions of the configuration files.<\/p>\n<\/div>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<div class=\"content-section\">\n<p>By combining the power of<strong>\u00a0Codestral<\/strong> for code generation with the security offered by <strong>OUTSCALE<\/strong>, companies can not only improve their productivity but also ensure the <strong>sovereignty<\/strong> and <strong>security<\/strong> of their code. Whether for industrial applications, complex projects, or critical environments, this solution is a true asset for development teams.<\/p>\n<p><strong>Stay tuned, as new announcements are coming soon!<\/strong><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Generative AI is playing an increasingly significant role in software development. By generating precise code snippets,&hellip;<\/p>\n","protected":false},"author":42,"featured_media":7169,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_lmt_disableupdate":"no","_lmt_disable":"","footnotes":""},"categories":[395,394,356],"tags":[],"class_list":["post-7265","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-cloud-experience","category-tech"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/posts\/7265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/comments?post=7265"}],"version-history":[{"count":2,"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/posts\/7265\/revisions"}],"predecessor-version":[{"id":7270,"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/posts\/7265\/revisions\/7270"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/media\/7169"}],"wp:attachment":[{"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/media?parent=7265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/categories?post=7265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.outscale.com\/en\/wp-json\/wp\/v2\/tags?post=7265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}