### API response example for OS installation Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/dedicated-servers/api-os-installation.md Example JSON response from the API after starting an OS installation. The taskId can be used to track the installation progress. ```json { "taskId": 123456789, "status": "init", "startDate": "2024-01-26T17:57:10+01:00", "doneDate": null, "function": "reinstallServer", "comment": "Start bare metal OS installation" } ``` -------------------------------- ### Example setup_vm.sh script Source: https://docs.ovhcloud.com/fr/guides/public-cloud/compute/create-image-from-existing-image-with-packer.md Example setup_vm.sh script that runs with sudo if not root, then installs git and clones a repository. Customize the script for your needs. ```sh #!/bin/sh set -ex if [ `id -u` -ne 0 ]; then sudo $0 exit 0 fi ## votre code personnalisé ci-dessous apt-get install git git clone ... ``` -------------------------------- ### Example valid hostname Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/virtual-private-servers/install-ispmanager.md Example of a valid hostname (FQDN) to enter when prompted during installation. ```console ispmanager.mondomaine.ovh ``` -------------------------------- ### GET /v1/setup_intents Source: https://docs.ovhcloud.com/fr/guides/public-cloud/data-platform/connectors-sources-stripe-technical-reference.md List setup intents for saving payment methods. ```APIDOC ## GET /v1/setup_intents ### Description List setup intents for saving payment methods. ### Method GET ### Endpoint `/v1/setup_intents` ### Parameters #### Query Parameters - **limit** (integer) - Optional - Maximum number of items to return. - **starting_after** (string) - Optional - Cursor for pagination. ### Response #### Success Response (200) - **object** (string) - Always "list". - **data** (array) - Array of setup intent objects. - **has_more** (boolean) - Indicates if there are more items. - **url** (string) - The URL for the list. #### Response Example { "object": "list", "data": [], "has_more": false, "url": "/v1/setup_intents" } ``` -------------------------------- ### Run local development server Source: https://docs.ovhcloud.com/fr/guides/public-cloud/data-platform/tutorials-app-development-react-shadcn.md Install dependencies and start the local development server, which runs on http://localhost:3333. ```bash npm install npm run dev ``` -------------------------------- ### Install node-fetch for Node.js Source: https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-endpoints-catalog-api.md Installs the node-fetch package for Node.js, required to run the JavaScript examples in this guide. ```bash npm install node-fetch ``` -------------------------------- ### Example output of the Nginx setup commands Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/backing-up-volumes-stash.md Shows the expected output from applying the manifest, checking the pod, waiting for the external IP, and making curl requests. ```console $ kubectl apply -f nginx-example.yml namespace/nginx-example created persistentvolumeclaim/nginx-logs created deployment.apps/nginx-deployment created service/nginx-service created $ kubectl get pod -n nginx-example NAME READY STATUS RESTARTS AGE nginx-deployment-766444c4d9-cxd2p 1/1 Running 0 32s $ kubectl -n nginx-example get svc nginx-service -w NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE nginx-service LoadBalancer 10.3.39.164 80:31734/TCP 49s nginx-service LoadBalancer 10.3.39.164 51.210.210.247 80:31734/TCP 3m $ curl -I 51.210.210.247 HTTP/1.1 200 OK Server: nginx/1.7.9 Date: Tue, 21 Dec 2021 14:16:20 GMT Content-Type: text/html Content-Length: 612 Last-Modified: Tue, 23 Dec 2014 16:25:09 GMT Connection: keep-alive ETag: "54999765-264" Accept-Ranges: bytes $ curl -I 51.210.210.247 HTTP/1.1 200 OK Server: nginx/1.7.9 Date: Tue, 21 Dec 2021 14:16:31 GMT Content-Type: text/html Content-Length: 612 Last-Modified: Tue, 23 Dec 2014 16:25:09 GMT Connection: keep-alive ETag: "54999765-264" Accept-Ranges: bytes ``` -------------------------------- ### Create virtual machine instance with trunk (example) Source: https://docs.ovhcloud.com/fr/guides/hosted-private-cloud/opcp/setup-trunk-on-node.md Example command to create a virtual machine instance using the trunk. Must use --port, not --nic. ```bash openstack server create \ --image ubuntu-22.04 \ --flavor m1.large \ --port primary-port \ --key-name my-keypair \ my-trunk-instance ``` -------------------------------- ### Login to OVHcloud CLI Source: https://docs.ovhcloud.com/fr/guides/public-cloud/cross-functional/disaster-recovery-plan-implementation.md Authenticate with the OVHcloud CLI. Run this command to log in and create your API credentials as described in the OVHcloud CLI getting started guide. ```bash ovhcloud login ``` -------------------------------- ### Show trunk configuration (example) Source: https://docs.ovhcloud.com/fr/guides/hosted-private-cloud/opcp/setup-trunk-on-node.md Example command to show the configuration of trunk 'my-trunk'. ```bash openstack network trunk show my-trunk ``` -------------------------------- ### Example output of ovhai job get Source: https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-cli-overview.md Example output of the ovhai job get command showing the job details, including the sshUrl field. ```console ovhai job get `` --- id: 0d916855-1cd4-4b66-8803-b4782bc13902 createdAt: "2021-02-23T08:45:01.297780Z" updatedAt: "2021-02-23T08:45:19.823082Z" user: user-xxx spec: image: ovhcom/ai-training-fastai env: [] defaultHttpPort: 8080 resources: gpu: 1 gpuModel: Tesla-V100S cpu: 7 volumes: [] timeout: 0 name: ai-training-fastai-kind sshPublicKeys: - ssh-ed25519 AAAAC3NzaC1someKey status: state: RUNNING queuedAt: "2021-02-23T08:45:01.297318Z" startedAt: "2021-02-23T08:45:13Z" stoppedAt: ~ ip: 10.42.155.122 infos: ~ history: - state: QUEUED date: "2021-02-23T08:45:01.297012Z" - state: INITIALIZING date: "2021-02-23T08:45:04.356856Z" - state: PENDING date: "2021-02-23T08:45:10.163754Z" - state: RUNNING date: "2021-02-23T08:45:19.822354Z" duration: 6 jobUrl: "http://0d916855-1cd4-4b66-8803-b4782bc13902.job.gra.ai.cloud.ovh.net" sshUrl: "ssh://0d916855-1cd4-4b66-8803-b4782bc13902@gra.ai.cloud.ovh.net" monitoringUrl: "http://monitoring.gra.ai.cloud.ovh.net/d/job/job-monitoring?var-job=0d916855-1cd4-4b66-8803-b4782bc13902&from=1614069913000" ``` -------------------------------- ### SSH with example key file Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/dedicated-servers/creating-ssh-keys.md Example of using the -i option to connect to a server with the key file myServer_rsa. ```bash ssh -i ~/.ssh/myServer_rsa ubuntu@203.0.113.100 ``` -------------------------------- ### Install gdown Source: https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-training-nvidia-neuralangelo-video-to-3d.md Installs the gdown Python package to download the example Lego video. ```shell pip install gdown ``` -------------------------------- ### Example GET request with CORS headers Source: https://docs.ovhcloud.com/fr/guides/storage-and-backup/object-storage/pcs-cors.md Example HTTP GET request to an object in a PCS container, including CORS-related headers such as Origin, Sec-Fetch-Mode, and X-Auth-Token. This is a real request that a browser might send. ```http GET /v1/AUTH_702xxxxxxxxxxxxxxxxxxxxxxxxxxdaf/pcs-web/lorem.txt HTTP/1.1 Host: storage.gra.cloud.ovh.net Connection: keep-alive sec-ch-ua: "Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92" X-Auth-Token: gAAAAABhB60RtB6kbTjksGne23pvSiW1X24BjFzpgInOeoXomd21etqpLw6ocys4SuC9PHZ3PfVMCHIMvb6yjyoEwg1XY2iWfcenCMOhG7POgv-i2NePNJSkjc9cE0eVTDEQ-VhtcOCc-ZvbU459a0HpsWUbGMwn8bUi4-hl3Cv5bwGgLuBxmbw sec-ch-ua-mobile: ?0 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Accept: */* Origin: http://example.com Sec-Fetch-Site: cross-site Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://example.com Accept-Encoding: gzip, deflate, br Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7 If-None-Match: 51f122f524c46cafcf9628305db99144 If-Modified-Since: Tue, 03 Aug 2021 07:10:26 GMT ``` -------------------------------- ### POST /dedicated/server/{serviceName}/install/start Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/dedicated-servers/api-os-installation.md Starts the OS installation on a dedicated server. The request body includes the operating system and customizations such as hostname, language, and post-installation script. ```APIDOC ## POST /dedicated/server/{serviceName}/install/start ### Description Starts the installation of an operating system on a dedicated server. The payload specifies the OS and customization options. ### Method POST ### Endpoint /dedicated/server/{serviceName}/install/start ### Parameters #### Path Parameters - **serviceName** (string) - Required - The name of the dedicated server. #### Request Body - **operatingSystem** (string) - Required - The OS identifier, e.g., "win2025core-std_64". - **customizations** (object) - Optional - Customization options. - **hostname** (string) - Optional - The hostname to set. - **language** (string) - Optional - The language locale, e.g., "fr-fr". - **postInstallationScript** (string) - Optional - Base64-encoded post-installation script (PowerShell or batch). - **postInstallationScriptExtension** (string) - Optional - Extension of the script: "ps1" for PowerShell or "cmd" for batch. Default is "ps1". ### Request Example ```json { "operatingSystem": "win2025core-std_64", "customizations": { "hostname": "ma-fenetre", "language": "fr-fr", "postInstallationScript": "ImNvdWNvdSBwb3N0SW5zdGFsbGF0aW9uU2NyaXB0UG93ZXJTaGVsbCIgfCBPdXQtRmlsZSAtRmlsZVBhdGggImM6XG92aHVwZFxzY3JpcHRcY291Y291LnR4dCIKKEdldC1JdGVtUHJvcGVydHkgLUxpdGVyYWxQYXRoICJSZWdpc3RyeTo6SEtMTVxTT0ZUV0FSRVxNaWNyb3NvZnRcQ3J5cHRvZ3JhcGh5IiAtTmFtZSAiTWFjaGluZUd1aWQiKS5NYWNoaW5lR3VpZCB8IE91dC1GaWxlIC1GaWxlUGF0aCAiYzpcb3ZodXBkXHNjcmlwdFxjb3Vjb3UudHh0IiAtQXBwZW5kCihHZXQtRGF0ZSkuVG9Vbml2ZXJzYWxUaW1lKCkuVG9TdHJpbmcoInl5eXktTU0tZGQgSEg6bW06c3MiKSB8IE91dC1GaWxlIC1GaWxlUGF0aCAiYzpcb3ZodXBkXHNjcmlwdFxjb3Vjb3UudHh0IiAtQXBwZW5kCg==" } } ``` ### Response #### Success Response (200) - **taskId** (integer) - The ID of the installation task. - **status** (string) - The status of the task (e.g., "init"). - **startDate** (string) - The start date of the task. - **doneDate** (string or null) - The completion date, null if not finished. - **function** (string) - The function name, e.g., "reinstallServer". - **comment** (string) - A comment about the task. #### Response Example ```json { "taskId": 123456789, "status": "init", "startDate": "2024-01-26T17:57:10+01:00", "doneDate": null, "function": "reinstallServer", "comment": "Start bare metal OS installation" } ``` ``` -------------------------------- ### Apply the CR tutorials_v1_ovhnginx.yaml Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/deploy-go-operator.md Applies the custom resource `tutorials_v1_ovhnginx.yaml` from the `./config/samples` directory to the `test-go-operator` namespace. The expected output confirms the creation of the `ovhnginx-sample` resource. ```bash kubectl apply -f ./config/samples/tutorials_v1_ovhnginx.yaml -n test-go-operator ``` ```console $ kubectl apply -f ./config/samples/tutorials_v1_ovhnginx.yaml -n test-go-operator ovhnginx.tutorials.ovhcloud.com/ovhnginx-sample created ``` -------------------------------- ### Verify ESO Installation with kubectl get all Source: https://docs.ovhcloud.com/fr/guides/manage-and-operate/secret-manager/external-secret-operator.md Verifies that the External Secrets Operator is running after installation. Shows the expected output of 'kubectl get all -n external-secrets', including pods, services, deployments, and replicasets. ```bash $ kubectl get all -n external-secrets NAME READY STATUS RESTARTS AGE pod/external-secrets-8cbc56569-9875p 1/1 Running 0 12s pod/external-secrets-cert-controller-565fcd479b-xbkcp 0/1 Running 0 12s pod/external-secrets-webhook-7fb59d4b88-9tkl6 0/1 Running 0 12s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/external-secrets-webhook ClusterIP 10.3.43.102 443/TCP 13s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/external-secrets 1/1 1 1 13s deployment.apps/external-secrets-cert-controller 0/1 1 0 13s deployment.apps/external-secrets-webhook 0/1 1 0 13s NAME DESIRED CURRENT READY AGE replicaset.apps/external-secrets-8cbc56569 1 1 1 13s replicaset.apps/external-secrets-cert-controller-565fcd479b 1 1 0 13s replicaset.apps/external-secrets-webhook-7fb59d4b88 1 1 0 13s ``` -------------------------------- ### Create bare metal instance with trunk (example) Source: https://docs.ovhcloud.com/fr/guides/hosted-private-cloud/opcp/setup-trunk-on-node.md Example command to create a bare metal instance using the trunk. Includes an availability zone. Must use --port, not --nic. ```bash openstack server create \ --image ubuntu-22.04 \ --flavor baremetal \ --port primary-port \ --key-name my-keypair \ --availability-zone "nova::88830859-5b16-4935-8f41-d381b754cbe5" \ my-trunk-instance ``` -------------------------------- ### Install boto3 with pip Source: https://docs.ovhcloud.com/fr/guides/public-cloud/data-platform/tutorials-bucket-s3-access.md Install the boto3 library using pip. This is a prerequisite for the Python example that follows. ```sh pip install boto3 ``` -------------------------------- ### Set up web root and copy site files on VPS Source: https://docs.ovhcloud.com/fr/guides/web-cloud/web-hosting/migrate-website-to-vps.md Commands to run on the VPS after transferring files via SFTP. They create the web root if needed, copy the site files from /home/debian/site/ to /var/www/html/ (using rsync or cp as an alternative), set ownership to www-data:www-data for Nginx/Apache on Debian/Ubuntu, and fix directory permissions to 755 and file permissions to 644. Replace /var/www/html with your actual web root if it differs. ```bash sudo mkdir -p /var/www/html ``` ```bash sudo rsync -a /home/debian/site/ /var/www/html/ ``` ```bash sudo cp -a /home/debian/site/. /var/www/html/ ``` ```bash sudo chown -R www-data:www-data /var/www/html ``` ```bash sudo find /var/www/html -type d -exec chmod 755 {} \; sudo find /var/www/html -type f -exec chmod 644 {} \; ``` -------------------------------- ### Install Python openai client Source: https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-endpoints-batch-mode.md Install the openai Python client to use the batch API examples. ```sh pip install openai ``` -------------------------------- ### Install missing packages manually Source: https://docs.ovhcloud.com/fr/guides/manage-and-operate/observability/logs-data-platform/elastalert.md Example of manually installing a missing package, such as setuptools_rust, if an error occurs. ```bash $ pip install setuptools_rust ``` -------------------------------- ### Example connection to PostgreSQL instance Source: https://docs.ovhcloud.com/fr/guides/public-cloud/databases/postgresql-connect-cli.md An example of a real connection command using the provided URI format. Replace the credentials and host with your own. ```console $ psql "postgres://avnadmin:Mysup3rs3cur3p4ssw0rd@postgresql-ab123456-cd7891011.database.cloud.ovh.net:20184/defaultdb?sslmode=require" ``` -------------------------------- ### Install required packages Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/virtual-private-servers/minecraft-server-on-vps.md Installs screen, nano, wget, and git, which are needed for the Minecraft server setup. ```sh $ sudo apt install screen nano wget git ``` -------------------------------- ### Create and initialize a Pulumi Go project Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/create-cluster.md Create a new directory, initialize a Pulumi project with Go, and install the OVH Pulumi SDK. ```bash mkdir pulumi_ovh_kube && cd pulumi_ovh_kube pulumi new go -y go get github.com/ovh/pulumi-ovh/sdk/go/... ``` -------------------------------- ### Create production bastion with PostgreSQL replication setup Source: https://docs.ovhcloud.com/fr/guides/public-cloud/cross-functional/disaster-recovery-plan-implementation.md Creates the bastion-prod instance and runs a cloud-config script that installs PostgreSQL client 17, discovers oc_* tables, creates a publication, dumps the schema, and sets up a subscription on the DRP database. Requires environment variables for regions, network IDs, and PostgreSQL credentials. ```bash BASTION_IMAGE_PROD=$(ovhcloud cloud reference list-images --region "$REGION_PROD" --os-type linux --filter 'name=="Ubuntu 24.04"' --output json | jq -r .[0].id) BASTION_FLAVOR_PROD=$(ovhcloud cloud reference list-flavors --filter "region==\"$REGION_PROD\" && name==\"b3-8\"" --output json | jq -r .[0].id) ovhcloud cloud instance create $REGION_PROD \ --name bastion-prod \ --boot-from.image "$BASTION_IMAGE_PROD" \ --flavor "$BASTION_FLAVOR_PROD" \ --billing-period hourly \ --network.private.id "$NETWORK_ID_PROD" \ --network.private.subnet-id "$SUBNET_ID_PROD" \ --network.private.gateway.id "$GATEWAY_ID_PROD" \ --network.private.floating-ip.create.description bastion-prod-fip \ --ssh-key.name "bastion-key" \ --wait \ --user-data "$(cat < /home/ubuntu/origin_tables.sql echo '[INFO] preparing subscriber $PG_HOST_DRP' PGPASSWORD='$PG_PASS_DRP' psql -h '$PG_HOST_DRP' -p '$PG_PORT_DRP' -U avnadmin -d nextcloud -c "CREATE EXTENSION IF NOT EXISTS aiven_extras CASCADE;" PGPASSWORD='$PG_PASS_PROD' psql -h '$PG_HOST_PROD' -p '$PG_PORT_PROD' -U avnadmin -d nextcloud -c "CREATE EXTENSION IF NOT EXISTS aiven_extras CASCADE;" PGPASSWORD='$PG_PASS_DRP' psql -h '$PG_HOST_DRP' -p '$PG_PORT_DRP' -U avnadmin -d nextcloud -a -f /home/ubuntu/origin_tables.sql PGPASSWORD='$PG_PASS_DRP' psql -h '$PG_HOST_DRP' -p '$PG_PORT_DRP' -U avnadmin -d nextcloud -c "SELECT * FROM aiven_extras.pg_create_subscription('dest_subscription', 'host=$PG_HOST_PROD password=$PG_PASS_PROD port=$PG_PORT_PROD dbname=nextcloud user=avnadmin', 'pub_source_tables', 'dest_slot', TRUE, TRUE);" EOF )" ``` -------------------------------- ### Install JavaScript openai SDK Source: https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-endpoints-batch-mode.md Install the official openai SDK for Node.js to use the batch API examples. ```sh npm install openai ``` -------------------------------- ### Create instance with pre-created volumes using source_type=volume Source: https://docs.ovhcloud.com/fr/guides/hosted-private-cloud/cloud-platform/snc-cloud-platform-glance-image-management.md Recommended best practice: pre-create each volume separately, then reference them in server create with source_type=volume (not image). This avoids the scheduling delays mentioned in the previous example. ```bash openstack server create \ --block-device uuid=,source_type=volume,destination_type=volume,boot_index=0 \ ... ``` -------------------------------- ### Install requests package Source: https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-ecosystem-lettria-models.md Command to install the Python 'requests' package, a prerequisite for the Python API call example. ```console pip install requests ``` -------------------------------- ### Run Hermes gateway setup Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/virtual-private-servers/install-hermes-agent.md Starts the interactive setup assistant for configuring messaging platforms, including Telegram. ```bash hermes gateway setup ``` -------------------------------- ### Installer le serveur Palworld avec './pwserver install' Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/virtual-private-servers/palworld-server-on-vps.md Lance l'installation du serveur Palworld. Suivre les instructions à l'écran et valider avec Entrée. En cas d'erreur 'missing dependencies', installer les dépendances manquantes et relancer cette commande. ```sh ~$ ./pwserver install ``` -------------------------------- ### Installation du client OpenVPN Source: https://docs.ovhcloud.com/fr/guides/public-cloud/network-services/stormshield-vrack.md Mettez à jour les paquets et installez le client OpenVPN sur l'instance Ubuntu. ```bash sudo apt-get update sudo apt-get install -y openvpn ``` -------------------------------- ### Run VMware Perl SDK installer Source: https://docs.ovhcloud.com/fr/guides/hosted-private-cloud/powered-by-vmware/vmware-installation-api.md Start the VMware vSphere Perl SDK installer. Accept the license terms and choose the installation directory (default /usr/bin). ```bash ./vmware-install.pl ``` -------------------------------- ### Example: Connect to instance with SSH Source: https://docs.ovhcloud.com/fr/guides/public-cloud/compute/configuring-additional-ssh-keys.md Example SSH connection command to user2@203.0.113.102. ```bash ssh user2@203.0.113.102 ``` -------------------------------- ### Verify installed PostgreSQL extensions with \dx Source: https://docs.ovhcloud.com/fr/guides/public-cloud/databases/postgresql-extensions.md Displays the list of currently installed extensions. The output shows the extension name, version, schema, and description. In this example, aiven_extras and pg_cron are installed, while plpgsql is installed by default. ```sql defaultdb=> \dx List of installed extensions Name | Version | Schema | Description --------------+---------+--------------+------------------------------ aiven_extras | 1.1.8 | aiven_extras | aiven_extras pg_cron | 1.4-1 | public | Job scheduler for PostgreSQL plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language -- In this example, aiven_extras and pg_cron are installed. plpgsql is installed by default. ``` -------------------------------- ### Expected output of kubeseal installation and version check Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/encrypt-secret-sealed-secrets-kubeseal.md Example output from running the Homebrew installation and the version check. It shows the installation process and the resulting kubeseal version v0.17.3. ```console $ brew install kubeseal Running `brew update --preinstall`... ==> Auto-updated Homebrew! ... ==> Pouring kubeseal--0.17.3.arm64_big_sur.bottle.tar.gz 🍺 /Users/avache/homebrew/Cellar/kubeseal/0.17.3: 5 files, 35.3MB ==> Running `brew cleanup kubeseal`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). $ kubeseal --version kubeseal version: v0.17.3 ``` -------------------------------- ### Expected output of the setup commands Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/backup-restore-pv-volume-snapshot.md Shows the expected output from applying the manifest, waiting for the service, and generating logs. ```console $ kubectl apply -f nginx-example-with-pv.yml namespace/nginx-example created persistentvolumeclaim/nginx-logs created deployment.apps/nginx-deployment created service/nginx-service created $ kubectl -n nginx-example get svc nginx-service -w NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE nginx-service LoadBalancer 10.3.28.41 80:32675/TCP 4s nginx-service LoadBalancer 10.3.28.41 80:32675/TCP 91s nginx-service LoadBalancer 10.3.28.41 135.125.XX.XXX 80:32675/TCP 91s nginx-service LoadBalancer 10.3.28.41 135.125.XX.XXX 80:32675/TCP 95s $ export LB_IP=$(kubectl -n nginx-example get svc nginx-service -o jsonpath='{.status.loadBalancer.ingress[0].ip}') $ echo $LB_IP 135.125.XX.XXX $ curl -I $LB_IP HTTP/1.1 200 OK Server: nginx/1.7.9 Date: Mon, 26 Sep 2022 06:56:32 GMT Content-Type: text/html Content-Length: 612 Last-Modified: Tue, 23 Dec 2014 16:25:09 GMT Connection: keep-alive ETag: "54999765-264" Accept-Ranges: bytes $ curl -I $LB_IP HTTP/1.1 200 OK Server: nginx/1.7.9 Date: Mon, 26 Sep 2022 06:56:33 GMT Content-Type: text/html Content-Length: 612 Last-Modified: Tue, 23 Dec 2014 16:25:09 GMT Connection: keep-alive ETag: "54999765-264" Accept-Ranges: bytes $ export POD_NAME=$(kubectl get po -n nginx-example -o name) $ echo $POD_NAME pod/nginx-deployment-5bfc8c9f6f-zplsl $ kubectl -n nginx-example exec $POD_NAME -c nginx -- cat /var/log/nginx/access.log 10.2.0.0 - - [26/Sep/2022:06:56:32 +0000] "HEAD / HTTP/1.1" 200 0 "-" "curl/7.64.1" "-" 141.94.164.46 - - [26/Sep/2022:06:56:33 +0000] "HEAD / HTTP/1.1" 200 0 "-" "curl/7.64.1" "-" ``` -------------------------------- ### Output of installing the Nginx Ingress Controller Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/secure-nginx-ingress-cert-manager.md Shows the installation output, including the deployment status and an example Ingress and Secret manifest. ```console $ helm -n ingress-nginx install ingress-nginx ingress-nginx/ingress-nginx --create-namespace NAME: ingress-nginx LAST DEPLOYED: Thu Apr 11 10:54:34 2024 NAMESPACE: ingress-nginx STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: The ingress-nginx controller has been installed. It may take a few minutes for the load balancer IP to be available. You can watch the status by running 'kubectl get service --namespace ingress-nginx ingress-nginx-controller --output wide --watch' An example Ingress that makes use of the controller: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: example namespace: foo spec: ingressClassName: nginx rules: - host: www.example.com http: paths: - pathType: Prefix backend: service: name: exampleService port: number: 80 path: / # This section is only required if TLS is to be enabled for the Ingress tls: - hosts: - www.example.com secretName: example-tls If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided: apiVersion: v1 kind: Secret metadata: name: example-tls namespace: foo data: tls.crt: tls.key: type: kubernetes.io/tls ``` -------------------------------- ### Create an instance on VLAN200 Source: https://docs.ovhcloud.com/fr/guides/public-cloud/network-services/stormshield-vrack.md Create an Ubuntu instance on the VLAN200 network using the imported key pair, assigning the name 'ubuntu-webserver'. ```bash openstack server create --flavor b2-7 --image "Ubuntu 22.04" --network stormshield-vlan200 --key-name ubuntu-webserver ``` -------------------------------- ### Verify the ingress-nginx installation Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/install-keycloak.md Shows the expected output when installing the ingress-nginx controller, including the notes with an example Ingress and Secret manifest. ```console $ helm install \ ovh-ingress-lab ingress-nginx/ingress-nginx \ --namespace ingress-nginx \ --create-namespace \ --version 4.0.6 NAME: ovh-ingress-lab LAST DEPLOYED: Tue Jun 28 09:43:52 2022 NAMESPACE: ingress-nginx STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: The ingress-nginx controller has been installed. It may take a few minutes for the LoadBalancer IP to be available. You can watch the status by running 'kubectl --namespace ingress-nginx get services -o wide -w ovh-ingress-lab-ingress-nginx-controller' An example Ingress that makes use of the controller: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: nginx name: example namespace: foo spec: ingressClassName: example-class rules: - host: www.example.com http: paths: - path: / pathType: Prefix backend: service: name: exampleService port: 80 # This section is only required if TLS is to be enabled for the Ingress tls: - hosts: - www.example.com secretName: example-tls If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided: apiVersion: v1 kind: Secret metadata: name: example-tls namespace: foo data: tls.crt: tls.key: type: kubernetes.io/tls ``` -------------------------------- ### Install Apache and documentation Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/dedicated-servers/installing-lamp-debian9-ubuntu18.md Installs Apache web server and its documentation package. ```bash sudo apt install -y apache2 apache2-doc ``` -------------------------------- ### Déployer une application avec kubectl (namespace, YAML, apply) Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/deploy-application.md Crée un namespace, définit un Service LoadBalancer et un Deployment pour l'image Docker `ovhplatform/hello` dans un fichier YAML, puis applique ce fichier avec kubectl. La sortie confirme la création du service `hello-world` et du déploiement `hello-world-deployment` dans le namespace `hello-app`. ```bash kubectl create ns hello-app ``` ```yaml apiVersion: v1 kind: Service metadata: name: hello-world labels: app: hello-world spec: type: LoadBalancer ports: - port: 80 targetPort: 80 protocol: TCP name: http selector: app: hello-world --- apiVersion: apps/v1 kind: Deployment metadata: name: hello-world-deployment labels: app: hello-world spec: replicas: 1 selector: matchLabels: app: hello-world template: metadata: labels: app: hello-world spec: containers: - name: hello-world image: ovhplatform/hello ports: - containerPort: 80 ``` ```bash kubectl apply -f hello.yml -n hello-app ``` ```console $ kubectl apply -f hello.yml -n hello-app service/hello-world created deployment.apps/hello-world-deployment created ``` -------------------------------- ### Verify Docker installation Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/virtual-private-servers/install-docker-on-vps.md Verifies the Docker installation by checking the versions of Docker Engine and Docker Compose, with an example of the expected output. ```bash docker --version docker compose version ``` ```console Docker version 29.x.x, build xxxxxxx Docker Compose version v2.x.x ``` -------------------------------- ### Initialize Let's Encrypt storage Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/virtual-private-servers/install-openclaw.md Create the directory and file for Let's Encrypt certificate storage with appropriate permissions. ```bash mkdir letsencrypt touch letsencrypt/acme.json chmod 600 letsencrypt/acme.json ``` -------------------------------- ### Remove Strapi installation directory Source: https://docs.ovhcloud.com/fr/guides/public-cloud/databases/postgresql-tuto-connect-strapi-to-managed-postgresql.md Use this command to delete the Strapi installation directory when cleaning up your setup. Ensure Strapi is stopped before running it. ```sh rm -rf /home/my/app/path/my-strapi/ ``` -------------------------------- ### Install Hermes gateway as systemd service Source: https://docs.ovhcloud.com/fr/guides/bare-metal-cloud/virtual-private-servers/install-hermes-agent.md Installs the gateway as a user-level systemd service, enabling automatic start and persistence across reboots. ```bash hermes gateway install ``` -------------------------------- ### Création d'une instance client OpenVPN Source: https://docs.ovhcloud.com/fr/guides/public-cloud/network-services/stormshield-vrack.md Déployez une instance Ubuntu sur OpenStack pour servir de client de test pour le VPN. ```bash openstack server create --flavor b2-7 --image "Ubuntu 22.04" --network Ext-Net --key-name sguyenne ubuntu-vpn-client ``` -------------------------------- ### Installer Govc via go Source: https://docs.ovhcloud.com/fr/guides/hosted-private-cloud/powered-by-vmware/vmware-datastore-upload.md Installe Govc avec go install à partir de la dernière version. ```bash go install github.com/vmware/govmomi/govc@latest ``` -------------------------------- ### GET /domain/{serviceName} - Example response showing nameServerType Source: https://docs.ovhcloud.com/fr/guides/web-cloud/domains/api-domain-dns.md Example JSON response from the GET /domain/{serviceName} API. The field 'nameServerType' indicates the DNS configuration type ('hosted' or 'external'). The field 'hostSupported' indicates whether glue records are supported by the registry. ```json { "parentService": null, "domain": "test.com", "offer": "gold", "dnssecSupported": true, "owoSupported": true, "transferLockStatus": "locked", "whoisOwner": "123456", "hostSupported": true, "glueRecordIpv6Supported": true, "glueRecordMultiIpSupported": true, "lastUpdate": "2021-11-02T12:01:13+01:00", "nameServerType": "hosted" } ``` -------------------------------- ### Strapi app creation output Source: https://docs.ovhcloud.com/fr/guides/public-cloud/databases/postgresql-tuto-connect-strapi-to-managed-postgresql.md Example output of the yarn create strapi-app command, showing the installation process and the prompt to choose the installation type. ```console $ yarn create strapi-app my-strapi yarn create v1.22.17 warning package.json: No license field [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Installed "create-strapi-app@4.0.2" with binaries: - create-strapi-app ? Choose your installation type Quickstart (recommended) ❯ Custom (manual settings) ``` -------------------------------- ### Sample session for attaching private networks Source: https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/vrack-example-between-private-networks.md Example session showing the commands and their output when attaching private networks to the gateway instance. The IDs and IP addresses are sample values; replace them with your own. ```console ~$ PRIV_NET_01_ID=$(openstack network list --name priv-net-01 --column ID -f value) ~$ PRIV_NET_02_ID=$(openstack network list --name priv-net-02 --column ID -f value) ~$ INSTANCE_ID=$(openstack server list --name my-vrack-gateway --column ID -f value) ~$ $ echo "$PRIV_NET_01_ID | $PRIV_NET_02_ID | $INSTANCE_ID" d2080f3f-285d-464a-aad8-74b935cf75e3 | b3cfb808-b4b7-406a-9e36-223c73747278 | 372b424a-ce4d-4e86-be67-4a8293f44f48 ~$ openstack server add fixed ip --fixed-ip-address 10.0.1.1 ${INSTANCE_ID} ${PRIV_NET_01_ID} ~$ openstack server add fixed ip --fixed-ip-address 10.0.2.1 ${INSTANCE_ID} ${PRIV_NET_02_ID} ~$ openstack server show ${INSTANCE_ID} --column addresses -f value Ext-Net=2001:41d0:305:1000::3e88, 54.38.255.196; priv-net-01=10.0.1.1; priv-net-02=10.0.2.1 ~$ INSTANCE_IP=54.38.255.54 ``` -------------------------------- ### Install AWS SDK with yarn or npm Source: https://docs.ovhcloud.com/fr/guides/public-cloud/data-platform/tutorials-bucket-s3-access.md Install the AWS SDK for JavaScript using either yarn or npm. This is a prerequisite for the NodeJS examples on this page. ```sh # Ajoutez aws-sdk à votre application avec la commande suivante yarn add aws-sdk # Ou npm i -s aws-sdk ``` -------------------------------- ### SSH connection example with -i Source: https://docs.ovhcloud.com/fr/guides/public-cloud/compute/creating-ssh-keys.md Example of connecting to an instance using the -i option with a custom key file name. ```bash ssh -i C:\Users\Username\.ssh/myInstance_rsa ubuntu@203.0.113.100 ``` -------------------------------- ### Clone and install Disk Image Builder 3.42.0 Source: https://docs.ovhcloud.com/fr/guides/hosted-private-cloud/opcp/how-to-create-centos-image.md Clones the DiB repository at version 3.42.0 and installs it in editable mode. The version is specified in the example. ```bash git clone --depth 1 --branch 3.42.0 https://opendev.org/openstack/diskimage-builder ~/diskimage-builder pip install -e ~/diskimage-builder ``` -------------------------------- ### Install logging-ldp from source Source: https://docs.ovhcloud.com/fr/guides/manage-and-operate/observability/logs-data-platform/logging-ldp Installs logging-ldp from the OVH GitHub repository by cloning the source and running the setup script. Requires Python 3 and Git. ```console $ git clone git@github.com:ovh/python-logging-ldp.git Cloning into 'python-logging-ldp'... remote: Counting objects: 58, done. remote: Compressing objects: 100% (53/53), done. remote: Total 58 (delta 26), reused 0 (delta 0) Receiving objects: 100% (58/58), 9.62 KiB | 0 bytes/s, done. Resolving deltas: 100% (26/26), done. Checking connectivity... done. $ cd python-logging-ldp $ python3 setup.py install [...] Using /usr/lib/python3.x/site-packages Finished processing dependencies for logging-ldp== ```