diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.de-de.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.de-de.md index 21588f9cff6..b4d38851571 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.de-de.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.de-de.md @@ -1,14 +1,28 @@ --- title: 'vRack für Public Cloud konfigurieren' excerpt: 'Erfahren Sie hier, wie Sie Ihr vRack mit Public Cloud Instanzen einrichten' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Ziel -Das OVHcloud [vRack](/links/network/vrack) ist ein privates Netzwerk, mit dem Sie die Adressierung zwischen mehreren Dedicated Servern von OVHcloud konfigurieren können. Sie können aber auch [Public Cloud Instanzen](/links/public-cloud/compute) zu Ihrem privaten Netzwerk hinzufügen, um eine Infrastruktur mit physischen und virtuellen Ressourcen zu erstellen. +Der OVHcloud [vRack](/links/network/vrack) ist eine Lösung für private Netzwerke, die es unseren Kunden ermöglicht, den Datenverkehr zwischen OVHcloud-Dedizierten Servern sowie anderen OVHcloud-Diensten zu leiten. Gleichzeitig können Sie [Public Cloud-Instanzen](/links/public-cloud/Compute) in Ihr privates Netzwerk einfügen, um eine Infrastruktur aus physischen und virtuellen Ressourcen zu erstellen. -**Diese Anleitung erklärt die Konfiguration Ihrer Public Cloud Instanzen im vRack.** +**Dieses Handbuch erklärt, wie Sie Public Cloud-Instanzen in Ihrem vRack konfigurieren.** ## Voraussetzungen @@ -17,65 +31,73 @@ Das OVHcloud [vRack](/links/network/vrack) ist ein privates Netzwerk, mit dem Si - Sie haben einen [OpenStack User erstellt](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user) (optional). - Sie haben Grundkenntnisse in Administration und Netzwerkkonfiguration. -## Vorstellung der Interfaces +## Schnittstellen -Ob Sie Ihr vRack neu erstellen oder eine Instanz zum Netzwerk hinzufügen möchten, Sie können dazu das OVHcloud Kundencenter verwenden, die OVHcloud APIv6, die OpenStack API, das Horizon-Interface oder Terraform. +Ein vRack erstellen oder eine Instanz in das Netzwerk hinzufügen kann mit dem OVHcloud Kundencenter, der OVHcloud APIv6, der OpenStack API, der Horizon-Schnittstelle oder Terraform erfolgen. -Je nach Ihrem technischen Profil und Ihren Bedürfnissen müssen Sie entscheiden, welches Interface oder welche Methode Sie verwenden. Für jede Aktion werden nachfolgend die möglichen Vorgehensweisen erklärt. +Je nach Ihrem technischen Profil und Ihren Anforderungen können Sie selbst entscheiden, welche Schnittstelle oder Methode Sie verwenden möchten. Für jede Option beschreibt die folgende Anleitung die notwendigen Schritte. -**Hier eine kurze Beschreibung der möglichen Aktionen, je nach gewählter Methode/Interface:** +**Zu Beginn finden Sie hier eine kurze Beschreibung der möglichen Aktionen je nach gewählter Methode/Schnittstelle.** -### OVHcloud Kundencenter +/// details | OVHcloud Kundencenter -Das [OVHcloud Kundencenter](/links/manager) ist ein ausschließlich visuelles Interface, ideal für die Verwaltung mehrerer VLANs. Sie haben auch die Möglichkeit, den privaten IP-Bereich anzupassen, vorkonfiguriert als 10.x.x.x/16. +Das [OVHcloud Kundencenter](/links/manager) ist eine vollständig visuelle Schnittstelle, die ideal geeignet ist, um mehrere VLANs zu verwalten. Sie können außerdem den privaten IP-Bereich anpassen, der standardmäßig in 10.1.0.0/16 liegt. -Die VLANs werden in der ausgewählten Region eingesetzt. Außerdem haben Sie die Möglichkeit, Gateways zu aktivieren oder zu deaktivieren, DHCP-Verteilungen zu aktivieren, etc. +Das VLAN wird in die ausgewählte Region bereitgestellt. Sie haben außerdem die Möglichkeit, Gateways zu aktivieren oder nicht, DHCP-Verteilungen zu ermöglichen usw. -Sie können auch die Abrechnung Ihrer Dienste über Ihr OVHcloud Kundencenter verwalten. +Sie können außerdem die Abrechnung Ihrer Dienste im OVHcloud Kundencenter verwalten. -### Horizon +/// -Das [Horizon-Interface](https://horizon.cloud.ovh.net/auth/login/) (unabhängig von OVHcloud) ist die originale Implementierung eines Dashboards für OpenStack, das ein Web-Benutzerinterface für OpenStack Dienste, insbesondere Nova, Swift und Keystone bereitstellt. + -Dieses umfassende technische Interface erlaubt es Ihnen, fast alle Aktionen in OpenStack zu verwalten. Dies wird eines der notwendigen Interfaces sein, wenn Sie mehr als zwei VLANs verwalten, private Netzwerkinterfaces zu Ihren Instanzen hinzufügen und personalisierte Images verwalten. +/// details | Horizon -Lesen Sie die [Anleitung zu Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon), um sich mit dem Interface vertraut zu machen. +Die [Horizon](https://horizon.cloud.ovh.net/auth/login/)-Schnittstelle (unabhängig von OVHcloud) ist die ursprüngliche Implementierung des OpenStack-Dashboards, das eine Web-Benutzeroberfläche für OpenStack-Dienste bereitstellt, einschließlich Nova, Swift, Keystone usw. + +Diese multifunktionale, technische Schnittstelle ermöglicht es Ihnen, fast alle OpenStack-Aktionen zu verwalten. Sie ist eine der notwendigen Schnittstellen, wenn Sie mehr als zwei VLANs verwalten müssen, private Netzwerkschnittstellen zu Ihren Instanzen hinzufügen, benutzerdefinierte Images verwalten usw. + +Beziehen Sie sich auf [dieses Handbuch](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon), um sich mit Horizon vertraut zu machen. > [!primary] -> Horizon mit Zonenfunktion: Denken Sie daran, Ihre Arbeitszone oben links in Ihrem Interface zu wählen (GRA5, SBG3, BHS1, etc.). +> Horizon ist zonenbezogen, daher müssen Sie sich daran erinnern, Ihre logische (geografische) Arbeitszone oben links in Ihrer Schnittstelle auszuwählen (GRA5, SBG3, BHS1 usw.). > -### OVHcloud APIv6 +/// + +/// details | OVHcloud APIv6 -Jede Aktion, die Sie im OVHcloud Kundencenter durchführen, erfolgt auf der Grundlage der [OVHcloud APIv6](/links/api). -Sie können mit der API darüber hinaus noch mehr Funktionen nutzen als über Ihr Kundencenter verfügbar sind. +Jede Aktion, die Sie in Ihrem OVHcloud Kundencenter durchführen, kann mit der [OVHcloud APIv6](/links/api) aufgerufen werden. +Sie bietet sogar mehr Möglichkeiten als die grafische Oberfläche. -Das Interface ist weniger visuell als das OVHcloud Kundencenter, ermöglicht Ihnen aber die Durchführung zahlreicher Aktionen. So können Sie Ihre VLANs verwalten und personalisieren, Interfaces zu Ihren Instanzen hinzufügen oder hochpersonalisierte Server erstellen. +Die API-Schnittstelle ist weniger visuell als das OVHcloud Kundencenter, ermöglicht Ihnen aber die Durchführung einer großen Anzahl von Aktionen. Sie können Ihr VLAN verwalten und anpassen, Schnittstellen zu Ihren Instanzen hinzufügen oder Server mit hoher Anpassung erstellen. -Vor der Verwendung eines bestimmten API-Aufrufs müssen Sie möglicherweise mehrere Parameter abfragen. +Sie können sie einfach über [unsere Webseite](/links/api) erreichen, aber auch verwenden, um Ihre PHP- oder Python-Skripte zu erstellen. -Sie können einfach von unserer Webseite aus auf die [API](/links/api) zugreifen, aber auch Ihre PHP- oder Python-Skripte verwenden, um API-Funktionen auszuführen. +Auf diese Weise können Sie grundlegende Aufgaben mit Skripten automatisieren, Ihre eigenen Funktionen optimieren und vieles mehr. -So können Sie Ihre Tasks frei automatisieren, Skripte verwenden, Ihre eigenen Funktionen optimieren etc. +Sie müssen möglicherweise verschiedene Informationen abrufen, bevor Sie einige API-Aufrufe verwenden, da ein spezifischer Eingabewert erforderlich ist. -Lesen Sie die [Anleitung zur OVHcloud API](/pages/manage_and_operate/api/first-steps), um sich mit der Verwendung der OVHcloud APIv6 vertraut zu machen. +Beziehen Sie sich auf [dieses Handbuch](/pages/manage_and_operate/api/first-steps), um mit der OVHcloud APIv6 zu beginnen. -### OpenStack API +/// -Public Cloud Dienste können nach dem Herunterladen und der Installation der OpenStack Tools mithilfe von Linux- oder Windows-Kommandozeilen verwaltet werden. +/// details | OpenStack API -Diese Methode erfordert fortgeschrittenes Wissen zu Linux oder Windows. Sie ermöglicht es jedoch, die gesamte Leistung von OpenStack zu nutzen. +Public Cloud-Dienste können nach dem Herunterladen und Installieren von OpenStack-Tools über Linux- oder Windows-Befehlszeilen verwaltet werden. -Je nach Verwaltungsebene verwenden Sie jeweils den Client für **Nova** (Compute), **Neutron** (Netzwerk), **Glance** (Image) oder **Swift** (Object Storage). Das letzte Element dieses Pakets, der OpenStack Client, erlaubt es Ihnen, fast alle Ebenen von OpenStack direkt zu verwalten. +Diese Methode erfordert ein gutes Wissen über Linux oder Windows, um sie nutzen zu können, ermöglicht Ihnen aber, die gesamte Leistung von OpenStack zu nutzen. -Dank der OpenStack API können Sie diese Verwaltung auch ganz einfach über Ihre Skripte automatisieren. +Je nach Schicht, die Sie verwalten möchten, müssen Sie den Nova (Compute), Neutron (Netzwerk), Glance (Image) oder Swift (Object Storage) Client verwenden. Die neueste Ergänzung zu dieser Palette, der OpenStack Client, ermöglicht es Ihnen, fast alle OpenStack-Schichten direkt zu verwalten. -Um sich mit der OpenStack API vertraut zu machen, lesen Sie zuerst folgende Anleitungen: +Mit der OpenStack API können Sie diese Verwaltung auch über Ihre Skripte automatisieren. -- [Umgebung für die Verwendung der OpenStack API vorbereiten](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +Um mehr über die Verwendung der OpenStack API zu erfahren, konsultieren Sie diese Handbücher: + +- [System für die Verwendung der OpenStack API vorbereiten](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) - [OpenStack Umgebungsvariablen einrichten](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) -Sie können dann bei Bedarf die dedizierten OpenStack APIs verwenden: +Sie können anschließend die für OpenStack vorgesehenen APIs nach Bedarf verwenden: - Nova (Compute) - Glance (Image) @@ -83,254 +105,1094 @@ Sie können dann bei Bedarf die dedizierten OpenStack APIs verwenden: - Neutron (Netzwerk) > [!primary] -> In einigen Fällen wird es einfacher sein, die OpenStack API zu verwenden, in anderen Fällen die APIs von Nova oder Neutron. +> In einigen Fällen ist es einfacher, die OpenStack-APIs zu verwenden, in anderen Fällen hingegen Nova, Neutron usw. > -> Je nach Version Ihres Clients und Betriebssystems können auch bestimmte Funktionen der OpenStack API fehlen. In dieser Anleitung werden je die einfachsten und intuitivsten Vorgehensweisen erklärt.
-> Sie können auch [die offizielle Dokumentation von OpenStack einsehen](https://docs.openstack.org/xena/), wenn Sie die API tiefergehend verwenden möchten. +> Darüber hinaus können einige Funktionen je nach Version Ihres Clients und Betriebssystems von der OpenStack-API fehlen. +> Um dieses Handbuch für alle zugänglich zu machen, werden die einfachsten und intuitivsten Optionen vorgestellt. +> Sie können sich bei Bedarf die [offizielle OpenStack-Dokumentation](https://docs.openstack.org/) ansehen, um mehr über deren Nutzung zu erfahren. > -### Terraform - -Terraform kann auch für die Verwaltung von OVHcloud Infrastrukturen verwendet werden. - -Dazu müssen Sie den richtigen Terraform-Anbieter und die richtige Terraform-Ressource auswählen. Weitere Informationen finden Sie in unserer Anleitung zur [Nutzung von Terraform mit OVHcloud (EN)](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). - -## In der praktischen Anwendung - -### Schritt 1: vRack aktivieren und verwalten - -#### Über das OVHcloud Kundencenter - -> [!primary] -> Dies gilt nicht für neu erstellte Projekte, da die automatisch mit einem vRack ausgeliefert werden. Um das vRack anzuzeigen, nachdem das Projekt erstellt wurde, gehen Sie in das Menü `Network`{.action} und klicken Sie auf `Privates Netzwerk vRack`{.action}, um alle vRacks anzuzeigen. -> - -Wenn Sie ein älteres Projekt haben und kein vRack besitzen, müssen Sie eines bestellen. Dieses Produkt ist kostenlos und die Bereitstellung dauert nur wenige Minuten. - -Klicken Sie im Menü auf der linken Seite des Bildschirms auf den Button `Dienst hinzufügen`{.action} (Warenkorb-Symbol). Verwenden Sie den Filter oben auf der Seite oder führen Sie einen Bildlauf nach unten durch, um den Dienst `vRack`{.action} zu finden. - -![vRack bestellen](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} - -Sie werden auf eine andere Seite weitergeleitet, um die Bestellung zu bestätigen. Dieser Vorgang dauert einige Minuten. - -Sobald der Dienst aktiv ist, finden Sie ihn in Ihrem Kundencenter im Bereich `Network`{.action} > `Privates vRack Netzwerk`{.action} unter der Bezeichnung "pn-xxxxxx". - -Wählen Sie in der Liste der wählbaren Dienste das Projekt aus, das Sie dem vRack hinzufügen möchten, und klicken Sie auf `Hinzufügen`{.action}. - -![Projekt hinzufügen](images/addprojectvrack.png){.thumbnail} - -Um die Konfiguration des vRack über das OVHcloud Kundencenter fortzusetzen, lesen Sie diese Anleitung weiter im Abschnitt "[Erstellen eines privaten Netzwerks im OVHcloud Kundencenter](#kundencenter)". +/// -#### Über die OVHcloud APIv6 +/// details | OpenStack CLI -Um ein vRack mit der OVHcloud APIv6 zu aktivieren und zu verwalten, lesen Sie [diesen Abschnitt](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) (EN) der entsprechenden Anleitung. +Sie können Ihre OVHcloud Public Cloud-Dienste und vRacks direkt über Ihren Linux- oder Windows-Terminal mit der OpenStack CLI verwalten. -### Schritt 2: Erstellen eines privaten Netzwerks im vRack +Diese Schnittstelle ermöglicht Ihnen die Verwaltung aller OpenStack-Schichten: -Es ist notwendig, ein virtuelles lokales Netzwerk (VLAN) zu erstellen, damit die mit dem vRack verbundenen Instanzen untereinander kommunizieren können. +- Nova: Instanzen (Compute) +- Neutron: Netzwerke +- Glance: Images +- Cinder: Volumes -Für Public Cloud können Sie bis zu 4000 VLANs innerhalb eines einzigen vRack erstellen. Das bedeutet, dass Sie jede private IP-Adresse bis zu 4000 mal verwenden können. -So kann beispielsweise die IP 192.168.0.10 des VLAN 2 von der IP 192.168.0.10 des VLAN 42 unterschieden werden. +Die CLI vereinigt diese Funktionen und kann in Ihre Skripte integriert werden, um Ihre Aufgaben zu automatisieren. -Dies ist nützlich, um Ihr vRack in mehrere virtuelle Netzwerke aufzuteilen. +Bevor Sie beginnen, konsultieren Sie bitte die folgenden Handbücher: -Im OVHcloud Kundencenter können Sie das VLAN Ihrer Wahl zuweisen und den Bereich der privaten IP-Adressen personalisieren. +- [System für die Verwendung der OpenStack API vorbereiten](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [OpenStack Umgebungsvariablen einrichten](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> Standardmäßig wird VLAN 0 verwendet. Die Funktionsweise der OpenStack-Infrastruktur macht es notwendig, die ID Ihres VLAN direkt auf Infrastrukturebene anzugeben. -> -> Im Gegensatz zu Dedicated Servern ist es nicht notwendig, das VLAN direkt auf einer Public Cloud Instanz zu taggen. > -> Weitere Informationen zur Verwaltung der vRack VLANs für Dedicated Server finden Sie in dieser Anleitung: "[Mehrere VLANs im vRack erstellen](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". - -> [!warning] -> Da das vRack eine von OVHcloud verwaltete Infrastruktur ist, können Sie es nur über das OVHcloud Kundencenter und die OVHcloud APIv6 verwalten. +> Die OpenStack CLI ist nützlich, um Ihren vRack zu verwalten, aber einige Funktionen können je nach Version des Clients oder Betriebssystems variieren. Beziehen Sie sich auf die [offizielle OpenStack-Dokumentation](https://docs.openstack.org/). > -> Da OpenStack nicht auf derselben Ebene der Infrastruktur liegt, können Sie die VLANs nicht über das Horizon-Interface oder die OpenStack APIs personalisieren. -> - -#### Erstellen eines privaten Netzwerks im OVHcloud Kundencenter - -Nachdem Sie Ihr vRack erstellt haben, erstellen Sie im nächsten Schritt ein privates Netzwerk. -Klicken Sie im Tab Public Cloud im linken Menü unter **Network** auf `Private Network`{.action}. +/// -![VLAN Erstellung](images/vrack2022-03.png){.thumbnail} +/// details | Terraform -Klicken Sie nun auf `Privates Netzwerk erstellen`{.action}. Auf der nächsten Seite können Sie mehrere Einstellungen anpassen. +Terraform kann ebenfalls verwendet werden, um OVHcloud-Infrastrukturen zu verwalten. -Wählen Sie in Schritt 1 die Regionen aus, in denen Sie das private Netzwerk einrichten möchten. +Dazu müssen Sie den richtigen Terraform-Provider und -Ressource auswählen. Weitere Informationen finden Sie in unserem Handbuch zu [der Verwendung von Terraform mit OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![select region](images/vrack5-2024.png){.thumbnail} +/// -Im nächsten Schritt erhalten Sie eine Reihe von Optionen: - -![create network](images/vrack6-2022.png){.thumbnail} - -Geben Sie im Feld **Name des privaten Netzwerks** einen Namen für Ihr privates Netzwerk ein. - -**Erstellen Sie ein Gateway und verbinden Sie sich mit dem privaten Netzwerk** +## In der praktischen Anwendung -Wählen Sie diese Option aus, wenn Sie beabsichtigen, Instanzen ausschließlich für ein privates Netzwerk zu erstellen. Weitere Informationen finden Sie in den folgenden Hilfen: [Creating a private network with Gateway (EN)](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) und [Public Cloud Instanz erstellen und einloggen](/pages/public_cloud/compute/public-cloud-first-steps). +### Schritt 1: Aktivieren und Verwalten eines vRacks > [!warning] -> Wenn die Option grau ist, bedeutet dies, dass sie mit der ausgewählten Region unvereinbar ist. Weitere Informationen finden Sie auf unserer Seite zur [Verfügbarkeit der Public Cloud Produkte für jede Region](/links/public-cloud/regions-pci). +> +> Das vRack wird auf der OVHcloud-Infrastruktur-Ebene verwaltet, was bedeutet, dass Sie es nur in Ihrem OVHcloud Kundencenter und der OVHcloud APIv6 verwalten können. > -**Netzwerk-Optionen von Layer 2:** - -Setzen Sie einen Haken bei `VLAN-ID festlegen` und wählen Sie eine Nummer von 0 bis 4000 aus. - -Wenn Sie dieses Feld nicht ankreuzen, wird eine zufällige VLAN-Nummer vergeben. - - -Wenn in diesem VLAN mit OVHcloud Dedicated Servern kommuniziert werden soll, lesen Sie folgende Anleitung: "[Mehrere VLANs im vRack erstellen](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)." - -**Verteilungsoptionen für DHCP-Adressen** - -Der DHCP-Bereich ist auf 10.0.0.0/16 voreingestellt. Sie können einen anderen privaten Bereich Ihrer Wahl verwenden. - -Wenn Sie Ihre Wahl getroffen haben, klicken Sie auf `Erstellen`{.action}, um den Prozess zu starten. +> [!tabs] +> Über das OVHcloud Kundencenter +>> > [!primary] +>> > +>> > Dies gilt nicht für neu erstellte Projekte, die jetzt automatisch mit einem vRack ausgeliefert werden. Um das vRack anzuzeigen, nachdem das Projekt erstellt wurde, gehen Sie in den Bereich `Network`{.action} und klicken Sie auf `Private vRack Netzwerk`{.action}, um das/die vRack(s) anzuzeigen. +>> > +>> +>> Wenn Sie ein älteres Projekt haben und kein vRack besitzen, müssen Sie eines bestellen. Die Nutzung des vRacks selbst ist kostenlos und kann innerhalb weniger Minuten ausgeliefert werden. +>> +>> Klicken Sie im linken Menü auf die Schaltfläche `Dienst hinzufügen`{.action} (Warenkorb-Symbol). Nutzen Sie den Filter oben auf der Seite oder scrollen Sie nach unten, um den Dienst `vRack`{.action} zu finden. +>> +>> ![vRack bestellen](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> Sie werden auf eine andere Seite weitergeleitet, um die Bestellung zu bestätigen. Es wird einige Minuten dauern, bis das vRack in Ihrem Konto eingerichtet ist. +>> +>> Sobald der Dienst aktiv ist, finden Sie ihn in Ihrem Control Panel im Bereich `Network`{.action} > `Private vRack Netzwerk`{.action}, bezeichnet als "pn-xxxxxx". +>> +>> Klicken Sie auf Ihr vRack, wählen Sie dann aus der Liste der verfügbaren Dienste das Projekt aus, das Sie zum vRack hinzufügen möchten, und klicken Sie auf die Schaltfläche `Hinzufügen`{.action}. +>> +>> ![Projekt zum vRack hinzufügen](images/addprojectvrack.png){.thumbnail} +>> +>> Um die Konfiguration Ihres vRacks über das OVHcloud Kundencenter fortzusetzen, fahren Sie mit diesem Leitfaden unter [Schritt 2: Ein privates Netzwerk im vRack erstellen](#create-pn-in-vrack) fort, im Tab **Über das OVHcloud Kundencenter**. +>> +> Über die OVHcloud APIv6 +>> +>> **Schritt 1: Aktivieren und Verwalten eines vRacks** +>> +>> Melden Sie sich über die entsprechende Anleitung ([Erste Schritte mit der OVHcloud API](/pages/manage_and_operate/api/first-steps)) in die OVHcloud APIv6-Schnittstelle an und folgen Sie diesen Schritten: +>> +>> **Erstellen des Warenkorbs** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf erstellt eine ID für Ihren „Warenkorb“. Sie können so viele Artikel wie gewünscht hinzufügen, bevor Sie ihn bestätigen. +>> > +>> > In diesem Fall ist die Bestellung eines vRacks allein kostenlos. Merken Sie sich Ihre Warenkorbnummer (cartId), sie wird für den Rest benötigt. +>> > +>> +>> **Abrufen der erforderlichen Informationen für die vRack-Bestellung** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf ermöglicht es Ihnen, alle erforderlichen Informationen für die Bestellung des vRacks abzurufen. Kopieren Sie Folgendes: +>> > +>> > *cartId*, *duration*, *planCode* und *pricingMode*. +>> > +>> +>> **Hinzufügen des vRacks zum Warenkorb** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf ermöglicht es Ihnen, das vRack durch Hinzufügen aller erforderlichen Informationen zur Bestellung in den Warenkorb zu legen. +>> > +>> > Bei einem vRack wären dies beispielsweise: +>> > +>> > cartId: [Ihre Warenkorb-ID] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Nachdem Sie die Bestellung bestätigt haben, erhalten Sie eine Artikelnummer ("itemId"). Behalten Sie diese Information, sie ist nützlich, wenn Sie Änderungen vornehmen möchten, bevor der Warenkorb bestätigt wird. +>> +>> **Bestätigen des Warenkorbs** +>> +>> Nachdem Sie alle Artikel in Ihren Warenkorb gelegt haben, müssen Sie diesen bestätigen: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf bestätigt den Warenkorb und erstellt eine Bestellung ("orderId"). Behalten Sie diese Information, sie ist notwendig, um die Bestellung zu bestätigen. +>> > +>> +>> **Bestätigen der endgültigen Bestellung** +>> +>> Um die Bestellung zu bestätigen, haben Sie zwei Möglichkeiten: +>> +>> - Gehe durch die sichtbare URL, wenn der Warenkorb bestätigt ist. +>> URL-Beispiel: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Bestätigen Sie mithilfe dieses Aufrufs: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Selbst wenn es sich um eine €0-Kaufbestellung handelt, ist es notwendig, eine Kaufbestellung (orderId) zu simulieren. Ihr Bestellformular wird dann bestätigt und die Bearbeitung beginnt. +>> > +>> +>> Nachdem die kostenlose Bestellung bestätigt wurde, kann es einige Minuten dauern, bis das vRack aktiviert wird. +>> +>> **Schritt 2: Ihr Public Cloud-Projekt dem vRack hinzufügen** +>> +>> Sobald das vRack aktiv ist, müssen Sie Ihr Public Cloud-Projekt (e) in das vRack integrieren. +>> +>> Melden Sie sich über die entsprechende Anleitung an: [Erste Schritte mit der OVHcloud API](/pages/manage_and_operate/api/first-steps). +>> +>> Falls die Projekt-ID unbekannt ist, ermöglichen die folgenden Aufrufe, sie abzurufen. +>> +>> **Identifizieren des Projekts** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf ruft die Liste der Projekte ab. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf identifiziert das Projekt über das Feld „description“. +>> > +>> +>> **Hinzufügen des Projekts zum vRack** +>> +>> Sobald die Projekt-ID und der vRack-Name bekannt sind, erfolgt die Zuordnung über den folgenden Aufruf: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Füllen Sie die Felder mit den zuvor abgerufenen Informationen aus: +>> +>> - **serviceName**: vRack-Name in der Form „pn-xxxxxx“. +>> - **project**: Die Public Cloud-Projekt-ID in Form einer 32-stelligen Zeichenkette. +>> +>> > [!primary] +>> > +>> > Dieser Aufruf initialisiert die Zuordnung des Projekts und des vRacks. Die Task-ID muss anschließend abgerufen werden, um den Fortschritt zu überprüfen. +>> > +>> +>> **Überprüfen des Fortschritts der Aufgabe** +>> +>> Sie können den Fortschritt der Aufgabe mit diesem Aufruf einsehen: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf ist optional und ermöglicht nur die Überprüfung des Status der Aufgabe. Sobald sie abgeschlossen ist, können Sie zum nächsten Schritt übergehen. +>> > +>> + +### Schritt 2: Ein privates Netzwerk im vRack erstellen + +Es ist notwendig, ein privates Netzwerk mit einem virtuellen lokalen Bereich (VLAN) zu erstellen, damit die angeschlossenen Instanzen miteinander kommunizieren können. + +Mit dem Public Cloud-Dienst können Sie bis zu 4 000 VLANs innerhalb eines vRacks erstellen. Das bedeutet, dass Sie jede private IP-Adresse bis zu 4 000 Mal verwenden können. +Somit ist beispielsweise 192.168.0.10 von VLAN 2 anders als die IP 192.168.0.10 von VLAN 42. + +Dies kann nützlich sein, um Ihr vRack zwischen mehreren virtuellen Netzwerken zu segmentieren. + +Über das OVHcloud Kundencenter und die OVHcloud APIv6 können Sie alle Einstellungen anpassen: Bereitstellungsmodus und Region, VLAN-Name und -ID, privater IP-Adressbereich (z. B. 10.0.0.0/16), DHCP und Gateway. > [!primary] -> Die Erstellung des privaten Netzwerks kann einige Minuten in Anspruch nehmen. +> Auf dedizierten Servern wird standardmäßig VLAN 0 verwendet. Die OpenStack-Infrastruktur erfordert, dass Sie Ihre VLAN-ID direkt auf der Infrastruktur-Ebene angeben. > - -#### Erstellen eines privaten Netzwerks mit der OVHcloud APIv6 - -Um ein privates Netzwerk mit der OVHCloud APIv6 zu erstellen, folgen Sie [diesem Abschnitt](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) der entsprechenden Anleitung (EN). - -#### Ein privates Netzwerk über Terraform erstellen - -In Terraform muss der Provider *openstack* verwendet werden. Ein vollständiges Beispiel für ein Terraform-Skript können Sie in [diesem Repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network) herunterladen. - -Der bezüglich OVHcloud relevante Part für die vRack-Integration ist der Parameter `value_specs`. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` - -### Schritt 3: Instanz in das vRack integrieren - -Es können zwei Situationen auftreten: - -- Die Instanz existiert noch nicht. -- Die Instanz existiert bereits und Sie müssen sie zum vRack hinzufügen. - -**Im Fall einer neuen Instanz** - -#### Über das OVHcloud Kundencenter - -Folgen Sie der Anleitung zum [Erstellen einer Public Cloud-Instanz](/pages/public_cloud/compute/public-cloud-first-steps). Bei der Erstellung einer Instanz können Sie in Schritt 5 einen Netzwerkmodus und anschließend ein privates Netzwerk auswählen, in das Ihre Instanz integriert werden kann. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> Bei der Erstellung einer neuen Instanz können Sie Ihre Instanz über das OVHcloud Kundencenter mit nur einem vRack verbinden. -> Um mehrere verschiedene Interfaces hinzuzufügen, müssen Sie die OpenStack API oder Horizon API verwenden. +> Im Gegensatz zu dedizierten Servern ist es nicht notwendig, ein VLAN direkt auf einer Public Cloud-Instanz zu kennzeichnen. > - -#### Über die OVHcloud APIv6 - -Bitte folgen Sie [diesem Abschnitt](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) (EN) der entsprechenden Anleitung. - -**Im Fall einer bestehenden Instanz** - -Das OVHcloud Kundencenter erlaubt es, eine Instanz mit einem oder mehreren privaten Netzwerken zu verbinden, bietet jedoch keine erweiterte Konfiguration der Netzwerkinterfaces. Wenn Sie diese weiter individualisieren möchten, muss die OVHcloud APIv6, die OpenStack APIs oder Horizon verwendet werden. - -Fügen Sie dann einfach zusätzlich zu dem existierenden ein neues Netzwerkinterface zu Ihrem Server hinzu. - -Wenn Sie zum Beispiel ein öffentliches Interface *eth0* haben, fügen Sie ein Interface *eth1* hinzu. +> Weitere Informationen zu diesem Thema finden Sie in der Anleitung "[Mehrere vLANs in einem vRack erstellen](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". > [!warning] -> Die Konfiguration dieses neuen Interfaces erfolgt wahrscheinlich nicht automatisch. -> Je nach Infrastruktur müssen Sie die Konfiguration daher als DHCP oder statische Adresse einrichten. +> vRack wird auf der OVHcloud-Infrastruktur-Ebene verwaltet, was bedeutet, dass Sie es nur im OVHcloud Kundencenter und der OVHcloud APIv6 verwalten können. +> +> Da OpenStack nicht auf der gleichen Ebene liegt, können Sie VLANs nicht über die Horizon-Schnittstelle oder OpenStack APIs anpassen. > -#### Über das OVHcloud Kundencenter - -Loggen Sie sich in Ihrem [OVHcloud Kundencenter](/links/manager) ein, gehen Sie in den Bereich `Public Cloud`{.action} und wählen Sie dann das betreffende Public Cloud Projekt oben links aus. - -Klicken Sie links im Menü auf `Instanzen`{.action}. Klicken Sie dann auf `...`{.action} rechts neben der betreffenden Instanz und anschließend auf `Instanz-Details`{.action}. - -![Instance](images/instance_details.png){.thumbnail} - -Dadurch wird das Dashboard der Instanz geöffnet. Klicken Sie auf `...`{.action} neben "Private(s) Netzwerk(e)", und wählen Sie `Netzwerk hinzufügen`{.action}. - -![Netzwerk anbinden](images/vrack2021-01.png){.thumbnail} - -Wählen Sie im daraufhin angezeigten Popup-Fenster die privaten Netzwerke aus, die Sie mit Ihrer Instanz verbinden möchten, und klicken Sie auf `Verbinden`{.action}. - -![Netzwerk anbinden](images/vrack9.png){.thumbnail} - -#### Verwaltung der Netzwerkinterfaces über die OVHcloud APIv6 - -Lesen Sie [diesen Abschnitt](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) (EN) der entsprechenden Anleitung. - -#### Verwaltung der Netzwerkinterfaces über OpenStack Horizon - -Loggen Sie sich in [Horizon](https://horizon.cloud.ovh.net/auth/login/) mit der im [ersten Teil dieser Anleitung](#horizon) beschriebenen Methode ein. - -Wählen Sie die korrekte Zone im Menü aus. - -![Horizon-Verbindung](images/horizon1.png){.thumbnail} - -Öffnen Sie `Compute` und dann `Instances` links im Menü. - -![Horizon Instanzen](images/horizon2.png){.thumbnail} - -**Ein privates Interface hinzufügen** - -Um ein Interface hinzuzufügen, klicken Sie in der Spalte "Actions" auf den Pfeil, um auf die Aktionen zuzugreifen, die auf der Instanz möglich sind. Klicken Sie dann auf `Attach Interface`{.action}. - -![Horizon Attach Interface](images/horizon3.png){.thumbnail} - -Wählen Sie Ihr Interface aus und bestätigen Sie. - -![Horizon Attach Interface](images/horizon4.png){.thumbnail} +> [!tabs] +> Über das OVHcloud Kundencenter +>> Sobald Ihr vRack eingerichtet ist, ist der nächste Schritt die Erstellung eines privaten Netzwerks. +>> +>> Klicken Sie im Bereich `Public Cloud`{.action} auf `Private Network`{.action} im linken Menü unter **Netzwerk**. +>> +>> ![VLAN-Erstellung](images/vrack2022-03.png){.thumbnail} +>> +>> Klicken Sie auf die Schaltfläche `Privates Netzwerk hinzufügen`{.action}. Die folgende Seite ermöglicht es Ihnen, mehrere Einstellungen anzupassen. +>> +>> Zunächst wählen Sie einen Bereitstellungsmodus und die Region aus, in der Sie das private Netzwerk erstellen möchten. +>> +>> ![Region auswählen](images/vrack5-2024.png){.thumbnail} +>> +>> Im nächsten Schritt werden Ihnen mehrere Optionen präsentiert: +>> +>> ![Netzwerk erstellen](images/vrack6-2022.png){.thumbnail} +>> +>> Im Feld **Name des privaten Netzwerks** legen Sie einen Namen für Ihr privates Netzwerk fest. +>> +>> **Netzwerkoption Layer 2** +>> +>> Wenn Sie das Feld `VLAN-ID festlegen`{.action} ankreuzen, können Sie manuell eine VLAN-ID zwischen 0 und 4 000 wählen. +>> +>> Wenn Sie das Feld nicht ankreuzen, wird dem privaten Netzwerk eine zufällige VLAN-ID zugewiesen. +>> +>> Wenn Sie mit Servern in diesem VLAN kommunizieren möchten, konsultieren Sie bitte die Anleitung: [Mehrere vLANs in einem vRack erstellen](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **Verteilungsoptionen für DHCP-Adressen** +>> +>> Der Standard-DHCP-Bereich ist 10.1.0.0/16. Sie können einen anderen privaten Bereich Ihrer Wahl verwenden oder DHCP für dieses private Netzwerk deaktivieren. +>> +>> **Netzwerk-Gateway-Optionen** +>> +>> - **Die erste Adresse einer bestimmten CIDR als Standardgateway ankündigen (DHCP-Option 3)**: Wenn diese Option aktiviert ist, bewirbt der DHCP-Server die erste Adresse im CIDR als Standard-Gateway für Geräte, die mit dem Netzwerk verbunden sind. +>> - **Einen Gateway zuweisen und sich mit dem privaten Netzwerk verbinden**: Wählen Sie diese Option, wenn Sie beabsichtigen, Instanzen mit einem privaten Netzwerk zu erstellen. Weitere Informationen finden Sie in den folgenden Anleitungen: [Ein privates Netzwerk mit Gateway erstellen](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) und [Erstellen und Verbinden mit Ihrer ersten Public Cloud-Instanz](/pages/public_cloud/Compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > Wenn die zweite Option grau ist, bedeutet dies, dass die ausgewählte Region sie nicht unterstützt. Weitere Informationen finden Sie auf unserer [Seite zur Regionenverfügbarkeit](/links/public-cloud/regions-pci). +>> > +>> +>> Sobald Sie fertig sind, klicken Sie auf `Ihr privates Netzwerk konfigurieren`{.action}, um den Prozess zu starten. +>> +>> > [!primary] +>> > +>> > Die Erstellung des privaten Netzwerks kann mehrere Minuten dauern. +>> > +>> +> Über die OVHcloud APIv6 +>> +>> Nachdem Sie sich in die [OVHcloud APIv6-Schnittstelle](/links/api) angemeldet haben, folgen Sie diesen Schritten: +>> +>> **Schritt 1: Abrufen der erforderlichen Informationen** +>> +>> **Public Cloud-Projekt** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf ruft die Liste der Projekte ab. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf identifiziert das Projekt über das Feld „description“. +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Geben Sie im Feld „serviceName“ die ID Ihres Projekts an. Speichern Sie die vRack-ID-Informationen in der Form „pn-xxxxx“. +>> > +>> +>> **Schritt 2: Erstellen des privaten Netzwerks** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Füllen Sie die Felder mit den zuvor abgerufenen Informationen aus: +>> > +>> > - **serviceName**: Projekt-ID. +>> > - **name**: Name Ihres VLANs. +>> > +>> > Sie können das Feld „Region“ leer lassen, um es für alle Regionen zu aktivieren. +>> > +>> > Der VLAN-Bezeichner (vlanId) ist erforderlich, wenn Sie ein bestimmtes VLAN erstellen möchten. +>> > +>> +>> Die Erstellung dauert einige Momente. +>> +>> Sie können Ihre VLAN-Informationen mit dem folgenden Aufruf überprüfen: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Dieser Aufruf ruft die „networkId“ in dieser Form ab: name-vrack_vlanId. +>> > +>> > Beispiel: VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Schritt 3: Erstellen eines Subnetzes** +>> +>> Standardmäßig wird folgender IP-Adressbereich verwendet, wenn kein Subnetz hinzugefügt wird: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> Wenn Sie die IP-Zuweisung selbst verwalten möchten, müssen Sie ein Subnetz erstellen. +>> +>> Dazu müssen Sie nach der Erstellung des VLANs für jede betroffene Region ein Subnetz mit folgendem API-Aufruf erstellen: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Füllen Sie die Felder gemäß der folgenden Tabelle aus. +>> +>> | Feld | Beschreibung | +>> | ----------- | ------------------------------------------------------------------------------------------------------ | +>> | serviceName | ID des Projekts. | +>> | networkId | Ihre Netzwerk-ID, die in den vorherigen Schritten ermittelt wurde. Beispiel: pn-xxxxxx_42 für VLAN 42. | +>> | dhcp | Kontrollkästchen zum Aktivieren / Deaktivieren von DHCP im VLAN. | +>> | end | Letzte Adresse des Subnetzes in dieser Region. Beispiel: 192.168.1.50. | +>> | network | IP-Block des Subnetzes. Beispiel: 192.168.1.0/24. | +>> | region | Beispiel: SBG3. | +>> | start | Erste Adresse des Subnetzes in dieser Region. Beispiel: 192.168.1.15. | +>> +>> > [!primary] +>> > +>> > In diesem Schritt wird das Subnetz pro Region erstellt. Sie können die Zuweisung privater IP-Adressen dynamisch über DHCP aktivieren oder deaktivieren. +>> > +>> > Sie müssen diesen Vorgang für jede Region wiederholen, in der Ihre Instanzen vorhanden sind. +>> +>> > [!warning] +>> > +>> > Achten Sie darauf, die IP-Adressbereiche für die verschiedenen Regionen voneinander zu trennen. Zum Beispiel: +>> > +>> > - Von 192.168.0.2 bis 192.168.0.254 für SBG1. +>> > - Von 192.168.1.2 bis 192.168.1.254 für GRA1. +>> > +>> +> Über Terraform +>> In Terraform müssen Sie den OpenStack-Provider verwenden. Ein Beispiel für ein vollständiges Terraform-Skript können Sie aus [diesem GitHub-Repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network) herunterladen. +>> +>> Der OVHcloud-spezifische Teil für die vRack-Integration ist der Parameter `value_specs`. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Über die OpenStack-CLI +>> Im folgenden Beispiel geben wir die `VLAN_ID`, zu der das Netzwerk gehören soll, über die Parameter `--provider-network-type` und `--provider-segment` an. +>> +>> Sie können diese Parameter entfernen. In diesem Fall wird eine verfügbare `VLAN_ID` automatisch verwendet. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> + +### Schritt 3: Integrieren einer Instanz in vRack + +Es gibt zwei mögliche Szenarien: + +- Die zu integrierende Instanz existiert noch nicht. +- Eine vorhandene Instanz muss dem vRack hinzugefügt werden. + +/// details | **Im Fall einer neuen Instanz** + +> [!tabs] +> Über das OVHcloud Kundencenter +>> Wenn Sie Unterstützung benötigen, folgen Sie zunächst diesem Leitfaden: [Erstellen einer Instanz im OVHcloud Kundencenter](/pages/public_cloud/Compute/public-cloud-first-steps). Beim Erstellen einer Instanz können Sie in Schritt 5 einen Netzwerkmodus wählen, gefolgt von einem privaten Netzwerk, in das Sie Ihre Instanz integrieren können. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > Sie können Ihre Instanz **nur mit einem** vRack über das OVHcloud Kundencenter verbinden. +>> > +>> > Um mehrere Schnittstellen hinzuzufügen, müssen Sie die OpenStack- oder Horizon-APIs verwenden. +>> > +>> +> Über die OVHcloud APIv6 +>> Nachdem Sie sich bei der [OVHcloud APIv6-Schnittstelle](/links/api) angemeldet haben, folgen Sie diesen Schritten: +>> +>> **Schritt 1: Erforderliche Informationen abrufen** +>> +>> **Projekt-ID abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **NetworkID des öffentlichen Netzwerks (Ext-Net) abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **NetworkID des privaten Netzwerks (vRack-Schnittstelle, die zuvor erstellt wurde) abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Der Bezeichner hat die Form: "pn-xxxxx_yy", wobei yy die VLAN-Nummer ist. +>> > +>> +>> **ID des ausgewählten Instanztyps (flavorId) abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > Sie können die Liste durch Angabe der Region beschränken, in der Ihre Instanz erstellt wird. +>> > +>> +>> **ID des ausgewählten Images (imageId) abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > Sie können die Liste durch Angabe der Region beschränken, in der Ihre Instanz erstellt wird. +>> > +>> +>> **ID Ihrer OpenStack-SSH-Schlüssels (sshKeyId) abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> Wenn Sie noch keinen SSH-Schlüssel in Ihrem OVHcloud Kundencenter hinzugefügt haben, können Sie dies mit dem folgenden Aufruf tun: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Instanz bereitstellen** +>> +>> Sobald alle für die Bereitstellung erforderlichen Elemente zusammengefasst sind, können Sie den folgenden Aufruf verwenden: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> Sie müssen mindestens die folgenden Felder ausfüllen: +>> +>> |Feld|Beschreibung| +>> |---|---| +>> |serviceName|ID des Public Cloud-Projekts.| +>> |flavorId|ID des Instanztyps (z. B. D2-2, B2-7, WIN-R2-15 usw.).| +>> |imageId|ID des Images für die Bereitstellung (z. B. Debian 9, Centos 7 usw.).| +>> |name|Name Ihrer Instanz.| +>> |networks|Im Abschnitt "networkId" geben Sie die Kennung des öffentlichen Netzwerks (Ext-Net) oder Ihrer VLAN (pn-xxxxxx_yy) an. Sie können auf die "+"-Schaltfläche klicken, um weitere Netzwerke hinzuzufügen.| +>> |region|Region für die Bereitstellung Ihrer Instanz (z. B. GRA5).| +>> |sshKeyId|ID Ihres OpenStack-SSH-Schlüssels.| +>> +>> Sobald der Aufruf abgeschlossen ist und alle Informationen korrekt ausgefüllt wurden, wird die Instanz mit einer oder mehreren Netzwerkschnittstellen erstellt. +>> +>> > [!warning] +>> > +>> > Abhängig vom Betriebssystem müssen Sie Ihre privaten Netzwerkschnittstellen manuell konfigurieren, damit sie berücksichtigt werden.
+>> > Da OpenStack die öffentliche Schnittstelle der vRack-Schnittstelle nicht priorisieren kann, kann die vRack-Schnittstelle manchmal als Standardroute gelten.
+>> > Die direkte Konsequenz ist, dass die Instanz über eine öffentliche IP nicht erreichbar ist.
+>> > Ein oder mehrere Neustarts der Instanz über das Control Panel können diese Situation beheben.
+>> > Eine andere Lösung besteht darin, sich über einen anderen Server im gleichen privaten Netzwerk mit der Instanz zu verbinden. Sie können auch die Netzwerkkonfiguration der Instanz über Rescue-Modus korrigieren. +>> > +>> +> Über die OpenStack CLI +>> Die folgenden Schritte sind erforderlich, um eine Instanz direkt im vRack zu erstellen. +>> +>> **Erforderliche Informationen abrufen** +>> +>> Öffentliche und private Netzwerke: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> oder +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Sie müssen sich die Netzwerk-IDs notieren, die Sie interessieren: +>> > +>> > - Ext-Net für eine öffentliche IP-Adresse. +>> > - Die VLAN(s), die für Ihre Konfiguration erforderlich sind. +>> > +>> +>> Notieren Sie auch die in der [Nova API-Benutzeranleitung](/pages/public_cloud/Compute/starting_with_nova) beschriebenen Informationen: +>> +>> - ID oder Name des OpenStack-SSH-Schlüssels. +>> - ID des Instanztyps (flavor). +>> - ID des gewünschten Images (Betriebssystem, Snapshot usw.). +>> +>> **Instanz bereitstellen** +>> +>> Mit den zuvor abgerufenen Elementen kann eine Instanz erstellt werden, die direkt im vRack integriert ist: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Beispiel: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> oder +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Beispiel: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> Sie können die IP-Adresse der Instanz Ihrer vRack-Schnittstelle auf der OpenStack-Ebene festlegen. +>> +>> Dazu können Sie ein einzelnes Argument zur Funktion "--nic" hinzufügen: +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Beispiel: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Instanz überprüfen** +>> +>> Nach einigen Momenten können Sie die Liste der bestehenden Instanzen überprüfen, um den Server zu finden, den Sie erstellt haben: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **Im Fall einer vorhandenen Instanz** + +Das OVHcloud Kundencenter ermöglicht es Ihnen, eine Instanz an eine oder mehrere private Netzwerke anzuschließen, bietet aber keine fortgeschrittene Netzwerkkonfiguration der Netzwerkschnittstellen. Wenn Sie weitere Anpassungen vornehmen möchten, müssen Sie diese entweder über die OVHcloud APIv6, über die OpenStack-APIs oder über Horizon verwalten. + +Die erforderliche Aktion besteht einfach darin, eine neue Netzwerkschnittstelle an Ihren Server anzufügen, zusätzlich zur vorhandenen. + +Zum Beispiel, wenn Sie eine öffentliche Schnittstelle *eth0* haben, fügen Sie die Schnittstelle *eth1* hinzu. -> [!primary] -> Ihre OVHcloud Instanz verfügt über ein neues Netzwerkinterface zusätzlich zum öffentlichen Interface ("Ext-net"). ->
In der Zusammenfassung zur Instanz können Sie die private IP-Adresse sehen, die dem Interface automatisch zugewiesen wurde. ->
Das Interface muss über DHCP konfiguriert oder IP-Adressen über eine statische IP-Konfiguration zugewiesen werden. +> [!warning] +> Die Konfiguration dieser neuen Schnittstelle ist selten automatisch. +> Sie müssen daher eine statische IP-Adresse zuweisen oder DHCP konfigurieren, je nach Ihrer Infrastruktur. > -**Eine Netzwerkschnittstelle entfernen** +> [!tabs] +> Über das OVHcloud Kundencenter +>> Melden Sie sich im [OVHcloud Kundencenter](/links/manager) an, gehen Sie in den Bereich `Public Cloud`{.action} und wählen Sie das betreffende Public Cloud-Projekt aus. +>> +>> Klicken Sie auf `Instanzen`{.action} in der linken Navigationsleiste und dann auf `⁝`{.action} rechts neben der Instanz. Wählen Sie `Details der Instanz`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> Dies öffnet das Instanz-Dashboard. Klicken Sie auf die Schaltfläche `⁝`{.action} im Bereich "Netzwerke", neben "Private Netzwerke", und wählen Sie `Netzwerk hinzufügen`{.action}. +>> +>> ![attach network](images/vrack2021-01.png){.thumbnail} +>> +>> Im sich öffnenden Fenster wählen Sie das/die private(n) Netzwerk(e) aus, die Sie an Ihre Instanz anhängen möchten, und klicken Sie auf `Bestätigen`{.action}. +>> +>> ![attach network](images/vrack9.png){.thumbnail} +>> +> Über die OVHcloud APIv6 +>> +>> Wenn Sie eine vorhandene Instanz in den vRack integrieren möchten, ist dies nicht über Ihr OVHcloud Kundencenter möglich. Sie müssen Horizon, die OpenStack-API oder die OVHcloud APIv6 verwenden. +>> +>> Die erforderliche Aktion besteht einfach darin, eine neue Netzwerkschnittstelle an Ihren Server anzufügen, zusätzlich zur vorhandenen. +>> +>> Zum Beispiel, wenn Sie eine öffentliche Schnittstelle *eth0* haben, fügen Sie die Schnittstelle *eth1* hinzu. +>> +>> > [!warning] +>> > +>> > Die Konfiguration dieser neuen Schnittstelle ist selten automatisch. +>> > Sie müssen daher eine statische IP-Adresse zuweisen oder DHCP konfigurieren, je nach Ihrer Infrastruktur. +>> > +>> +>> **Die folgenden Schritte beschreiben, wie Sie die Netzwerkschnittstellen Ihrer Instanzen verwalten.** +>> +>> **Schritt 1: Erforderliche Informationen abrufen** +>> +>> **Projekt-ID abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Instanz-ID abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Netzwerk-ID des öffentlichen Netzwerks (Ext-Net) abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Netzwerk-ID des privaten Netzwerks (vorher erstellte vRack-Schnittstelle) abrufen** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Der Bezeichner hat die Form: "pn-xxxxx_yy", wobei yy die VLAN-Nummer ist. +>> > +>> +>> **Schritt 2: Eine Schnittstelle an Ihre Instanz anhängen** +>> +>> Sobald alle erforderlichen Elemente zusammengetragen sind, können Sie den folgenden Aufruf verwenden: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> Sie müssen mindestens die folgenden Felder ausfüllen: +>> +>> |Feld|Beschreibung| +>> |---|---| +>> |serviceName|ID des Public Cloud-Projekts.| +>> |instanceId|ID der Instanz.| +>> |networkId|Geben Sie die öffentliche Netzwerk-ID (Ext-Net) oder Ihre VLAN-ID (pn-xxxxxx_yy) ein.| +>> |ip|Definieren Sie eine spezifische IP-Adresse (funktioniert nur für private Schnittstellen).| +>> +>> Sobald der Aufruf abgeschlossen ist und alle Informationen korrekt ausgefüllt wurden, wird eine neue Schnittstelle an Ihre Instanz angehängt. +>> +>> > [!primary] +>> > +>> > Ihre OVHcloud-Instanz hat eine neue Netzwerkschnittstelle zusätzlich zur öffentlichen Schnittstelle (Ext-Net).
+>> > In der Zusammenfassung der Instanz können Sie die private IP-Adresse einsehen, die automatisch Ihrer Schnittstelle zugewiesen wird.
+>> > Es ist Ihre Verantwortung, die Schnittstelle korrekt über DHCP zu konfigurieren oder durch statische IP-Adressen zu verwenden. +>> > +>> +>> **Schritt 3: Eine Schnittstelle von Ihrer Instanz trennen** +>> +>> > [!warning] +>> > +>> > Das Trennen einer Netzwerkschnittstelle ist dauerhaft. +>> > +>> > Es ist jedoch wichtig zu beachten, dass, wenn Sie die Schnittstelle "Ext-Net" (öffentliche IP) trennen, diese Adresse freigegeben und in den Verkehr zurückgeführt wird. Sie kann nicht einfach erneut zugewiesen werden.
+>> > Diese Aktion ist nur erforderlich, wenn Sie Ihren Server im vRack (privates Netzwerk) isolieren möchten oder wenn Sie ihn von einer oder mehreren VLANs trennen möchten. +>> > +>> +>> Sobald alle erforderlichen Informationen abgerufen wurden, können Sie den folgenden Aufruf verwenden, um eine Schnittstelle zu trennen: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> Sie müssen mindestens die folgenden Felder ausfüllen: +>> +>> |Feld|Beschreibung| +>> |---|---| +>> |serviceName|ID des Public Cloud-Projekts.| +>> |instanceId|ID der Instanz.| +>> |networkId|Geben Sie die öffentliche Netzwerk-ID (Ext-Net) oder Ihre VLAN-ID (pn-xxxxxx_yy) ein.| +>> +> Über Horizon +>> Melden Sie sich über die [Horizon-Schnittstelle](https://horizon.cloud.ovh.net/auth/login/) an, wie [hier](#horizon) erwähnt. +>> +>> Wählen Sie die richtige Arbeitszone aus. +>> +>> ![connection Horizon](images/horizon1.png){.thumbnail} +>> +>> Wählen Sie `Compute` und dann `Instances` aus dem Menü. +>> +>> ![Horizon Compute instances](images/horizon2.png){.thumbnail} +>> +>> **Ein privates Interface hinzufügen** +>> +>> Um ein Interface hinzuzufügen, klicken Sie auf den Pfeil in der Spalte `Actions`, um die möglichen Aktionen für die Instanz anzuzeigen. Wählen Sie `Attach Interface`{.action}. +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Wählen Sie Ihr Interface aus und bestätigen Sie. +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Ihre OVHcloud-Instanz hat eine neue Netzwerkschnittstelle zusätzlich zur öffentlichen Schnittstelle (Ext-Net).
+>> > In der Zusammenfassung der Instanz können Sie die private IP-Adresse einsehen, die automatisch Ihrem Interface zugewiesen wird.
+>> > Es ist Ihre Verantwortung, das Interface korrekt über DHCP zu konfigurieren oder durch statische IP-Adressen zu verwenden. +>> > +>> +>> **Ein privates Netzwerkinterface trennen** +>> +>> > [!warning] +>> > +>> > Das Trennen eines Netzwerkinterfaces ist dauerhaft. +>> > +>> > Es ist jedoch wichtig zu beachten, dass, wenn Sie die Schnittstelle "Ext-Net" (öffentliche IP) trennen, diese Adresse freigegeben und in den Verkehr zurückgeführt wird. Sie kann nicht einfach erneut zugewiesen werden.
+>> > Diese Aktion ist nur erforderlich, wenn Sie Ihren Server im vRack (privates Netzwerk) isolieren möchten oder wenn Sie ihn von einer oder mehreren VLANs trennen möchten. +>> > +>> +>> Um ein privates Interface zu trennen, klicken Sie auf den Pfeil in der Spalte `Actions`, um die möglichen Aktionen für die Instanz anzuzeigen. Wählen Sie `Detach Interface`{.action}. +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Wählen Sie Ihr Interface aus und bestätigen Sie. +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Über die OpenStack CLI +>> Die folgenden Schritte sind notwendig, um eine vorhandene Instanz in den vRack zu integrieren. +>> +>> **Erforderliche Informationen abrufen** +>> +>> Identifizieren Sie Ihre Instanzen: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> oder +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Öffentliche und private Netzwerke: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> oder +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Sie müssen sich die Netzwerk-IDs notieren, die Sie benötigen: +>> > +>> > - Ext-Net für eine öffentliche IP-Adresse +>> > - Die VLAN(s), die für Ihre Konfiguration erforderlich sind +>> > +>> +>> **Ein privates Netzwerkinterface hinzufügen** +>> +>> Um ein neues Interface anzuhängen, führen Sie den folgenden Befehl aus: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Beispiel: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> Sie können prüfen, ob die Aktion erfolgreich war: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => Ihre öffentliche IP +>> | MyVLAN-42 network | 192.168.0.x | => Ihre private IP +>> [...] +>> ``` +>> +>> oder +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => Ihre öffentliche IP ; Ihre private IP +>> [...] +>> ``` +>> + +### Ein Netzwerkinterface entfernen > [!warning] -> Wenn Sie eine Netzwerkschnittstelle trennen, wird diese sofort gelöscht. > -> Es ist jedoch wichtig zu beachten, dass durch das Entfernen des "Ext-Net" Interface dessen öffentliche IP-Adresse freigegeben und wieder verfügbar wird. Sie können die Adresse nicht gezielt zuweisen. -> Diese Aktion ist nur dann notwendig, wenn Sie Ihren Server im vRack (privates Netzwerk) isolieren oder ihn aus einem oder mehreren VLANs herausnehmen möchten. +> Das Trennen eines Netzwerkinterfaces ist dauerhaft. > +> Es ist jedoch wichtig zu beachten, dass, wenn Sie die Schnittstelle "Ext-Net" (öffentliche IP) trennen, diese Adresse freigegeben und in den Verkehr zurückgeführt wird. Sie kann nicht einfach erneut zugewiesen werden.
+> Diese Aktion ist nur erforderlich, wenn Sie Ihren Server im vRack (privates Netzwerk) isolieren möchten oder wenn Sie ihn von einer oder mehreren VLANs trennen möchten. +> + +Um ein Interface zu trennen, müssen Sie zuerst den Neutron-Port identifizieren, der erstellt wurde. +Dazu können Sie die folgenden Befehle verwenden: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` -Um ein Interface zu löschen, klicken Sie in der Spalte "Actions" auf den Pfeil, um auf die Aktionen zuzugreifen, die auf der Instanz möglich sind. Klicken Sie dann auf `Detach Interface`{.action}: +oder + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Sobald Sie den zu entfernenden Port identifiziert haben, können Sie den folgenden Befehl ausführen: -Wählen Sie das zu löschende Interface aus und bestätigen Sie: +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +Beispiel: -## Weiterführende Informationen +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` + +/// -[Konfiguration von vRack für Public Cloud mit OVHcloud APIv6](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) (EN) +## Weiterführende Informationen -[Dedicated Server - Mehrere VLANs im vRack erstellen](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +[Erstellen mehrerer vLANs in einem vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) -Wenn Sie Schulungen oder technische Unterstützung bei der Implementierung unserer Lösungen benötigen, wenden Sie sich an Ihren Vertriebsmitarbeiter oder klicken Sie auf [diesen Link](/links/professional-services), um einen Kostenvoranschlag zu erhalten und eine persönliche Analyse Ihres Projekts durch unsere Experten des Professional Services Teams anzufordern. +Wenn Sie Schulungen oder technische Unterstützung benötigen, um unsere Lösungen umzusetzen, wenden Sie sich an Ihren Vertriebsmitarbeiter oder klicken Sie auf [diesen Link](/links/professional-services), um ein Angebot zu erhalten und unsere Professional Services-Experten um Unterstützung bei Ihrem spezifischen Use Case Ihres Projekts zu bitten. -Treten Sie unserer [User Community](/links/community) bei. +Treten Sie unserer [User Community](/links/community) bei. \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-asia.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-asia.md index e0510e2ed30..83fd8002e64 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-asia.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-asia.md @@ -1,9 +1,23 @@ --- title: 'Configuring vRack for Public Cloud' excerpt: 'Find out how to set up vRack for your Public Cloud instances' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objective The OVHcloud [vRack](/links/network/vrack) is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services. At the same time, it allows you to add [Public Cloud instances](/links/public-cloud/compute) to your private network to create an infrastructure of physical and virtual resources. @@ -25,15 +39,19 @@ Depending on your technical profile and needs, it is mostly up to you which inte **To begin with, the following provides a brief description of the possible actions according to the chosen method/interface.** -### OVHcloud Control Panel +/// details | OVHcloud Control Panel -The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.x.x.x/16. +The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.1.0.0/16. The VLAN will be deployed to the selected Region. You will also have the option of activating the gateways or not, enabling DHCP distributions, etc. You can also manage billing for your services in the OVHcloud Control Panel. -### Horizon +/// + + + +/// details | Horizon The [Horizon](https://horizon.cloud.ovh.net/auth/login/) interface (independent from OVHcloud) is the original implementation of the OpenStack dashboard, which provides a web user interface to OpenStack services, including Nova, Swift, Keystone, etc. @@ -45,25 +63,32 @@ Please refer to [this guide](/pages/public_cloud/public_cloud_cross_functional/i > Horizon functions zone-specific, therefore you need to remember to choose your logical (geographic) work zone at the top left of your interface (GRA5, SBG3, BHS1, etc.). > -### OVHcloud APIv6 +/// + +/// details | OVHcloud APIv6 -Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). It even offers more possibilities than the graphical interface. +Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). +It even offers more possibilities than the graphical interface. The API interface is less visual than the OVHcloud Control Panel but will allow you to perform a large number of actions. You can manage and customise your VLAN, add interfaces to your instances, or create highly customised servers. -You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. +You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. + +This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. You may need to retrieve various information before using some API calls because a specific input is required. Please refer to [this guide](/pages/manage_and_operate/api/first-steps) to get started with the OVHcloud APIv6. -### OpenStack API +/// + +/// details | OpenStack API -Public Cloud services can be adminstrated using Linux or Windows command lines after downloading and installing OpenStack tools. +Public Cloud services can be administrated using Linux or Windows command lines after downloading and installing OpenStack tools. This method requires a good knowledge of Linux or Windows to take advantage of it, but it allows you to leverage all the power of OpenStack. -Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (object storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. +Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (Object Storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. With the OpenStack API, you can also easily automate this management through your scripts. @@ -87,60 +112,249 @@ You will then be able to use the APIs dedicated to OpenStack as needed: > You may consult the [official OpenStack documentation](https://docs.openstack.org/) if you wish to go further in learning about its use. > -For more information, consult this guide: [Configuring vRack for Public Cloud using OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | OpenStack CLI -Terraform can also be used to manage OVHcloud infrastructures. +You can manage your OVHcloud Public Cloud services and vRacks directly from your Linux or Windows terminal using the OpenStack CLI. -For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +This interface allows you to manage all OpenStack layers: -## Instructions +- Nova: instances (compute) +- Neutron: networks +- Glance: images +- Cinder: volumes -### Step 1: Activating and managing a vRack +The CLI centralizes these features and can be integrated into your scripts to automate your tasks. -#### In the OVHcloud Control Panel +Before you begin, please consult the following guides: + +- [Prepare the environment for using the OpenStack API](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Load OpenStack environment variables](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +> +> The OpenStack CLI is useful for managing your vRack, but some functions may vary depending on the version of the client or operating system. Please refer to the [official OpenStack documentation](https://docs.openstack.org/). > -If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. - -In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +/// details | Terraform -Once the service is active, you will find it in your Control Panel in the `Nerwork`{.action} section > `vRack private network`{.action}. Labelled "pn-xxxxxx". +Terraform can also be used to manage OVHcloud infrastructures. -From the list of eligible services, select the project you want to add to the vRack and click the `Add`{.action} button. +For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![add project to vrack](images/addprojectvrack.png){.thumbnail} +/// -To continue the configuration of your vRack in the OVHcloud Control Panel, skip to the section [Creating a private network in the OVHcloud Control Panel](./#creating-a-private-network-in-the-ovhcloud-control-panel) of this guide. +## Instructions -#### With the OVHcloud APIv6 +### Step 1: Activating and managing a vRack -To activate and manage a vRack using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) of the corresponding guide. +> [!warning] +> +> The vRack is managed at the OVHcloud infrastructure level, which means that you can only administer it in your OVHcloud Control Panel and the OVHcloud APIv6. +> -### Step 2: Creating a private network in the vRack +> [!tabs] +> Via the OVHcloud Control Panel +>> > [!primary] +>> > +>> > This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +>> > +>> +>> If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. +>> +>> In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. +>> +>> ![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +>> +>> Once the service is active, you will find it in your Control Panel in the `Network`{.action} section > `vRack private network`{.action}, labelled "pn-xxxxxx". +>> +>> Click on your vRack, then select the project you want to add to the vRack from the list of eligible services and click the `Add`{.action} button. +>> +>> ![add project to vrack](images/addprojectvrack.png){.thumbnail} +>> +>> To continue configuring your vRack from the OVHcloud Control Panel, continue reading this guide from [Step 2: Create a private network in the vRack](#create-pn-in-vrack), under the **From the OVHcloud Control Panel** tab. +>> +> Via the OVHcloud APIv6 +>> +>> **Step 1: Activating and managing a vRack** +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide ([First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps)) and follow these steps: +>> +>> **Creating the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > This call will create an ID for your 'shopping cart'. You can add as many articles as you want before you validate it. +>> > +>> > In this case, the order of a vRack alone is free. Remember your cart number (cartId), it will be required for the rest. +>> > +>> +>> **Retrieving the necessary information for the vRack order** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call will allow you to retrieve all the information needed to order the vRack. Copy the following: +>> > +>> > *cartId*, *duration*, *planCode*, and *pricingMode*. +>> > +>> +>> **Adding the vRack to the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call allows you to add the vRack to the cart by adding all the necessary information to the order. +>> > +>> > For a vRack, this would be, for example: +>> > +>> > cartId: [your cart identifier] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Once you have validated the order, you will receive an item number ("itemId"). Keep this information, it will be useful if you wish to make changes before the validation of the cart. +>> +>> **Validating the cart** +>> +>> Once you have put all the items in your cart, you will need to validate it: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > This call will validate the cart and create a purchase order ("orderId"). Keep this information, it will be necessary to validate the order. +>> > +>> +>> **Validating the final order** +>> +>> To validate the order, you have two possibilities: +>> +>> - Pass through the visible URL when the cart is validated. +>> URL example: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validate using this call: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Even if it is a €0 purchase order, it is necessary to simulate a purchase order payment (orderId). Your order form will then be validated and processing will begin. +>> > +>> +>> Once the free order has been validated, it may take a few minutes for the vRack to be activated. +>> +>> **Step 2: Adding your Public Cloud project to the vRack** +>> +>> Once the vRack is active, you will need to integrate your Public Cloud project(s) into the vRack. +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide: [First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps). +>> +>> In case the project ID is unknown, the calls below allow you to retrieve it. +>> +>> **Identifying the project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **Adding the project to the vRack** +>> +>> Once the project ID and the vRack name are known, their association is made through the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Fill in the fields with the information previously retrieved: +>> +>> - **serviceName**: vRack name in the form "pn-xxxxxx". +>> - **project**: The Public Cloud project ID in the form of a 32-character string. +>> +>> > [!primary] +>> > +>> > This call initializes the association of the project and the vRack. The task ID must then be retrieved to check the progress. +>> > +>> +>> **Checking the progress of the task** +>> +>> You can view the progress of the task with this call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > This call is optional and only allows you to check the status of the task. Once it is complete, you can proceed to the next step. +>> > +>> + +### Step 2: Creating a private network in the vRack It is necessary to create a private network with a virtual local area network (VLAN) so that the connected instances can communicate with each other. -With the Public Cloud service, you can create up to 4,000 VLANs within one vRack. This means that you can use each private IP address up to 4,000 times. +With the Public Cloud service, you can create up to 4 000 VLANs within one vRack. This means that you can use each private IP address up to 4 000 times. Thus, for example, 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42. + This can be useful in order to segment your vRack between multiple virtual networks. -In the OVHcloud Control Panel, you can assign the VLAN of your choice and customise the private IP range. +From the OVHcloud Control Panel and OVHcloud APIv6, you can customise all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g. 10.0.0.0/16), DHCP, and gateway. > [!primary] > On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires to specify your VLAN ID directly at the infrastructure level. > > Unlike dedicated servers, there is no need to tag a VLAN directly on a Public Cloud instance. > -> To learn more about this topic, please refer to the guide [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +> To learn more about this topic, please refer to the guide "[Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". > [!warning] > vRack is managed at the OVHcloud infrastructure level, meaning you can only administrate it in the OVHcloud Control Panel and the OVHcloud APIv6. @@ -148,79 +362,205 @@ In the OVHcloud Control Panel, you can assign the VLAN of your choice and custom > Because OpenStack is not located at the same level, you will not be able to customise VLANs through the Horizon interface or OpenStack APIs. > -#### Creating a private network in the OVHcloud Control Panel - -Once you have your vRack set, the next step is to create a private network. - -In the Public cloud tab, click on `Private Network`{.action} in the left-hand menu under **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. - -In step 1, select the region in which you want the private network to be located. - -![select region](images/vrack5-2024.png){.thumbnail} - -In the next step, a number of options are presented to you: - -![create network](images/vrack6-2022.png){.thumbnail} - -In the **Private Network Name** field, set a name for your private network. - -**Create a Gateway and connect to the private network** - -Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> If the option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. -> - -**Layer 2 network options** - -If you tick the `Set a VLAN ID` box, you will be able to manually choose a VLAN ID number between 0 and 4,000. - -If you do not tick the box, the system will assign a random VLAN ID number to your private network. - -If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**DHCP address distribution options** - -The default DHCP range is 10.0.0.0/16. You can use a different private range of your choice. - -Once done, click on `Create`{.action} to start the process. - -> [!primary] -> Creating the private network may take several minutes. -> - -#### Creating a private network with the OVHcloud APIv6 - -To create a private network using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) of the corresponding guide. - - -#### Creating a private network with Terraform - -In Terraform, you will need to use the openstack provider. You can download an example of a complete terraform script in [this repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -The OVHcloud specific part for vRack integration is the `value_specs` parameter. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Via the OVHcloud Control Panel +>> Once you have your vRack set, the next step is to create a private network. +>> +>> In the `Public Cloud`{.action} tab, click on `Private Network`{.action} in the left-hand menu under **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. +>> +>> To begin, select a deployment mode and the region in which you want to create the private network. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> In the next step, a number of options are presented to you: +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> In the **Private Network Name** field, set a name for your private network. +>> +>> **Layer 2 network option** +>> +>> If you tick the `Set VLAN ID`{.action} box, you will be able to manually choose a VLAN ID number between 0 and 4 000. +>> +>> If you do not tick the box, the system will assign a random VLAN ID number to your private network. +>> +>> If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **DHCP address distribution options** +>> +>> The default DHCP range is 10.1.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network. +>> +>> **Network Gateway Options** +>> +>> - **Announce the first address of a given CIDR. as the default gateway (DHCP option 3)**: When this option is enabled, the DHCP server advertises the first address in the CIDR as the default gateway to machines connected to the network. +>> - **Assign a Gateway and connect to the private network**:Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > If the second option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. +>> > +>> +>> Once done, click on `Configure your private network`{.action} to start the process. +>> +>> > [!primary] +>> > +>> > Creating the private network may take several minutes. +>> > +>> +> Via the OVHcloud APIv6 +>> +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Public Cloud project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > In the field "serviceName", specify the ID of your project. Save the vRack ID information in the form "pn-xxxxx". +>> > +>> +>> **Step 2: Creating the private network** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Fill in the fields with the information previously obtained: +>> > +>> > - **serviceName**: project ID. +>> > - **name**: name of your VLAN. +>> > +>> > You can leave the "Region" field blank in order to enable it for all regions. +>> > +>> > The VLAN identifier (vlanId) is required if you want to create a specific VLAN. +>> > +>> +>> The creation will take a few moments. +>> +>> You can check your VLAN information with the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the "networkId" in this form: name-vrack_vlanId. +>> > +>> > For example, VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Step 3: Creating a subnet** +>> +>> By default, if you do not add a subnet, the IP range used is: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> If you want to manage IP assignments yourself, you will need to create a subnet. +>> +>> To do this, once the VLAN is created, you will need to create the subnet for each affected area by the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Fill in the fields according the following table. +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the project.| +>> |networkId|Your network ID, retrieved with previous steps. Example: pn-xxxxxx_42 for VLAN 42.| +>> |dhcp|Check box for enabling / uncheck for disabling DHCP in the VLAN.| +>> |end|Last address of the subnet in this region. Example: 192.168.1.50.| +>> |network|Subnet IP block. Example: 192.168.1.0/24.| +>> |region|Example: SBG3.| +>> |start|First address of the subnet in this region. Example: 192.168.1.15.| +>> +>> > [!primary] +>> > This is the stage of creating the subnet by region. You can enable or disable private IP address assignment dynamically through DHCP. +>> > +>> > You will need to do the same for each region where your instances are present. +>> > +>> +>> > [!warning] +>> > +>> > Be careful to separate your IP address pools for different regions. For example: +>> > +>> > - From 192.168.0.2 to 192.168.0.254 for SBG1. +>> > - From 192.168.1.2 to 192.168.1.254 for GRA1. +>> > +>> +> Via Terraform +>> In Terraform, you will need to use the OpenStack provider. You can download an example of a complete terraform script in [this GitHub repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> The OVHcloud specific part for vRack integration is the `value_specs` parameter. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Via the OpenStack CLI +>> In the following example we specify the `VLAN_ID` to which we want the network to be part of through `--provider-network-type` and `--provider-segment`. +>> +>> You can remove those parameters. In that case, an available `VLAN_ID` will be used. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Step 3: Integrating an instance into vRack @@ -229,25 +569,293 @@ There are two possible scenarios: - The instance to be integrated does not exist yet. - An existing instance needs to be added to the vRack. -**In case of a new instance** - -#### In the OVHcloud Control Panel - -If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. -> To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. -> - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) of the corresponding guide. - - -**In case of an existing instance** +/// details | **In case of a new instance** + +> [!tabs] +> Via the OVHcloud Control Panel +>> If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. +>> > +>> > To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. +>> > +>> +> Via the OVHcloud APIv6 +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Retrieving the ID of the chosen instance type (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving the ID of the chosen image (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving your OpenStack SSH key ID (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> If you have not added an SSH key to your OVHcloud Control Panel yet, you can do so using the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Deploying the instance** +>> +>> Once all the elements necessary for the deployment are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |flavorId|ID of the instance type (example: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|ID of the image for the deployment (example: Debian 9, Centos 7, etc.).| +>> |name|Name for your instance.| +>> |networks|In the "networkId" section, indicate the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy). You can click the "+" button to add more networks.| +>> |region|Region for your instance deployment (example: GRA5).| +>> |sshKeyId|ID of your OpenStack SSH key.| +>> +>> Once the call is complete, if all information is correctly filled in, the instance will be created with one or more network interfaces. +>> +>> > [!warning] +>> > +>> > Depending on operating systems, you will need to manually configure your private network interfaces to be considered.
+>> > Because OpenStack is unable to prioritise the public interface of the vRack interface, the vRack interface may sometimes pass as the default route.
+>> > The direct consequence is that the instance is unreachable from a public IP.
+>> > One or more reboots of the instance from the Control Panel can resolve this situation.
+>> > The other solution is to connect to the instance via another server in the same private network. You can also correct the network configuration of the instance through Rescue mode. +>> > +>> +> Via the OpenStack CLI +>> The following steps are necessary to create an instance directly in the vRack. +>> +>> **Retrieving the required information** +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address. +>> > - The VLAN(s) required for your configuration. +>> > +>> +>> Also note the information detailed in the [Nova API user guide](/pages/public_cloud/compute/starting_with_nova): +>> +>> - ID or name of the OpenStack SSH key. +>> - ID of the instance type (flavor). +>> - ID of the desired image (operating system, snapshot, etc.). +>> +>> **Deploying the instance** +>> +>> With the previously retrieved items, an instance can be created, including it directly in the vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> You can set the IP address of the instance of your vRack interface at the OpenStack level. +>> +>> To do this, you can add a single argument to the function "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Example: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verifying the instance** +>> +>> After a few moments you can check the list of existing instances to find the server you created: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **In case of an existing instance** The OVHcloud Control Panel allows you to attach an instance to one or more private networks but does not offer advanced network interface configuration. If you want to customise further, you will need to manage them either through the OVHcloud APIv6, through the OpenStack APIs or via Horizon. @@ -260,77 +868,331 @@ For example, if you have a public interface *eth0*, you will add the interface * > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. > -#### In the OVHcloud Control Panel - -Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. - -Click on `Instances`{.action} in the left-hand navigation bar and then on `...`{.action} to the right of the instance. Select `Instance details`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -This will open the instance dashboard. Click on the `...`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. - -![attach network](images/vrack2021-01.png){.thumbnail} - -In the popup window that appears, select the private network(s) to attach to your instance and click `Attach`{.action}. - -![attach network](images/vrack9.png){.thumbnail} - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) of the corresponding guide. - -#### With OpenStack Horizon - -Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](./#horizon). - -Choose the proper work zone. - -![connection Horizon](images/horizon1.png){.thumbnail} - -Select `Compute` and then `Instances` from the menu. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Adding a private interface** - -To add an interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Select your interface and confirm. - -![Horizon attach interface](images/horizon4.png){.thumbnail} - -> [!primary] -> Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net). ->
In the instance summary, you can see the private IP address that is automatically assigned to your interface. ->
It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. -> - -**Detaching a network private interface** +> [!tabs] +> Via the OVHcloud Control Panel +>> Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. +>> +>> Click on `Instances`{.action} in the left-hand navigation bar and then on `⁝`{.action} to the right of the instance. Select `Instance details`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> This will open the instance dashboard. Click on the `⁝`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. +>> +>> ![attach network](images/vrack2021-01.png){.thumbnail} +>> +>> In the popup window that appears, select the private network(s) to attach to your instance and click `Confirm`{.action}. +>> +>> ![attach network](images/vrack9.png){.thumbnail} +>> +> Via the OVHcloud APIv6 +>> +>> If you need to integrate an existing instance into the vRack, it is not possible to do so from your OVHcloud Control Panel. You will need to use Horizon, the OpenStack API or the OVHcloud APIv6. +>> +>> The required action is simply to add a new network interface to your server, in addition to the existing one. +>> +>> For example, if you have a public interface *eth0*, you will add the interface *eth1*. +>> +>> > [!warning] +>> > +>> > The configuration of this new interface is rarely automatic. +>> > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. +>> > +>> +>> **The steps below describe how to manage the network interfaces of your instances.** +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the instance ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Step 2: Adding an interface to your instance** +>> +>> Once all the elements necessary are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> |ip|Define a specific IP (only works for private interfaces).| +>> +>> Once the call is complete, if all information is correctly filled in, a new interface will be added to your instance. +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Step 3: Removing an interface from your instance** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> Once all the necessary information is retrieved, you can use the following call to remove an interface: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> +> Via Horizon +>> Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](#horizon). +>> +>> Choose the proper work zone. +>> +>> ![connection Horizon](images/horizon1.png){.thumbnail} +>> +>> Select `Compute` and then `Instances` from the menu. +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Adding a private interface** +>> +>> To add an interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Attach Interface`{.action}. +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Detaching a network private interface** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> To detach a private interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Detach Interface`{.action}. +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Via the OpenStack CLI +>> The following steps are necessary to integrate an existing instance into the vRack. +>> +>> **Retrieving the required information** +>> +>> Identify your instances: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address +>> > - The VLAN(s) required for your configuration +>> > +>> +>> **Adding a private network interface** +>> +>> In order to attach a new interface, execute the following command: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> You can verify that the action has been performed: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => your public IP +>> | MyVLAN-42 network | 192.168.0.x | => your private IP +>> [...] +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => your public IP ; your private IP +>> [...] +>> ``` +>> + +### Removing a network interface > [!warning] +> > Detaching a network interface is permanent. > -> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it. ->
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+> This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. > -To detach a private interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Detach Interface`{.action}. +In order to detach an interface, you will first need to identify the Neutron port that has been created. +You can do this by using the following commands: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` + +or + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Once you have identified the port to remove, you can execute the following command: -Select your interface and confirm. +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +Example: -## Go further +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` + +/// -[Configuring vRack for Public Cloud using OVHcloud APIv6](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) +## Go further [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](/links/professional-services) to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project. -Join our [community of users](/links/community). +Join our [community of users](/links/community). \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-au.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-au.md index c496ed11d84..83fd8002e64 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-au.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-au.md @@ -1,9 +1,23 @@ --- title: 'Configuring vRack for Public Cloud' excerpt: 'Find out how to set up vRack for your Public Cloud instances' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objective The OVHcloud [vRack](/links/network/vrack) is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services. At the same time, it allows you to add [Public Cloud instances](/links/public-cloud/compute) to your private network to create an infrastructure of physical and virtual resources. @@ -25,15 +39,19 @@ Depending on your technical profile and needs, it is mostly up to you which inte **To begin with, the following provides a brief description of the possible actions according to the chosen method/interface.** -### OVHcloud Control Panel +/// details | OVHcloud Control Panel -The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.x.x.x/16. +The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.1.0.0/16. The VLAN will be deployed to the selected Region. You will also have the option of activating the gateways or not, enabling DHCP distributions, etc. You can also manage billing for your services in the OVHcloud Control Panel. -### Horizon +/// + + + +/// details | Horizon The [Horizon](https://horizon.cloud.ovh.net/auth/login/) interface (independent from OVHcloud) is the original implementation of the OpenStack dashboard, which provides a web user interface to OpenStack services, including Nova, Swift, Keystone, etc. @@ -45,25 +63,32 @@ Please refer to [this guide](/pages/public_cloud/public_cloud_cross_functional/i > Horizon functions zone-specific, therefore you need to remember to choose your logical (geographic) work zone at the top left of your interface (GRA5, SBG3, BHS1, etc.). > -### OVHcloud APIv6 +/// + +/// details | OVHcloud APIv6 -Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). It even offers more possibilities than the graphical interface. +Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). +It even offers more possibilities than the graphical interface. The API interface is less visual than the OVHcloud Control Panel but will allow you to perform a large number of actions. You can manage and customise your VLAN, add interfaces to your instances, or create highly customised servers. -You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. +You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. + +This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. You may need to retrieve various information before using some API calls because a specific input is required. Please refer to [this guide](/pages/manage_and_operate/api/first-steps) to get started with the OVHcloud APIv6. -### OpenStack API +/// + +/// details | OpenStack API -Public Cloud services can be adminstrated using Linux or Windows command lines after downloading and installing OpenStack tools. +Public Cloud services can be administrated using Linux or Windows command lines after downloading and installing OpenStack tools. This method requires a good knowledge of Linux or Windows to take advantage of it, but it allows you to leverage all the power of OpenStack. -Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (object storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. +Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (Object Storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. With the OpenStack API, you can also easily automate this management through your scripts. @@ -87,60 +112,249 @@ You will then be able to use the APIs dedicated to OpenStack as needed: > You may consult the [official OpenStack documentation](https://docs.openstack.org/) if you wish to go further in learning about its use. > -For more information, consult this guide: [Configuring vRack for Public Cloud using OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | OpenStack CLI -Terraform can also be used to manage OVHcloud infrastructures. +You can manage your OVHcloud Public Cloud services and vRacks directly from your Linux or Windows terminal using the OpenStack CLI. -For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +This interface allows you to manage all OpenStack layers: -## Instructions +- Nova: instances (compute) +- Neutron: networks +- Glance: images +- Cinder: volumes -### Step 1: Activating and managing a vRack +The CLI centralizes these features and can be integrated into your scripts to automate your tasks. -#### In the OVHcloud Control Panel +Before you begin, please consult the following guides: + +- [Prepare the environment for using the OpenStack API](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Load OpenStack environment variables](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +> +> The OpenStack CLI is useful for managing your vRack, but some functions may vary depending on the version of the client or operating system. Please refer to the [official OpenStack documentation](https://docs.openstack.org/). > -If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. - -In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +/// details | Terraform -Once the service is active, you will find it in your Control Panel in the `Nerwork`{.action} section > `vRack private network`{.action}. Labelled "pn-xxxxxx". +Terraform can also be used to manage OVHcloud infrastructures. -From the list of eligible services, select the project you want to add to the vRack and click the `Add`{.action} button. +For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![add project to vrack](images/addprojectvrack.png){.thumbnail} +/// -To continue the configuration of your vRack in the OVHcloud Control Panel, skip to the section [Creating a private network in the OVHcloud Control Panel](./#creating-a-private-network-in-the-ovhcloud-control-panel) of this guide. +## Instructions -#### With the OVHcloud APIv6 +### Step 1: Activating and managing a vRack -To activate and manage a vRack using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) of the corresponding guide. +> [!warning] +> +> The vRack is managed at the OVHcloud infrastructure level, which means that you can only administer it in your OVHcloud Control Panel and the OVHcloud APIv6. +> -### Step 2: Creating a private network in the vRack +> [!tabs] +> Via the OVHcloud Control Panel +>> > [!primary] +>> > +>> > This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +>> > +>> +>> If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. +>> +>> In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. +>> +>> ![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +>> +>> Once the service is active, you will find it in your Control Panel in the `Network`{.action} section > `vRack private network`{.action}, labelled "pn-xxxxxx". +>> +>> Click on your vRack, then select the project you want to add to the vRack from the list of eligible services and click the `Add`{.action} button. +>> +>> ![add project to vrack](images/addprojectvrack.png){.thumbnail} +>> +>> To continue configuring your vRack from the OVHcloud Control Panel, continue reading this guide from [Step 2: Create a private network in the vRack](#create-pn-in-vrack), under the **From the OVHcloud Control Panel** tab. +>> +> Via the OVHcloud APIv6 +>> +>> **Step 1: Activating and managing a vRack** +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide ([First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps)) and follow these steps: +>> +>> **Creating the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > This call will create an ID for your 'shopping cart'. You can add as many articles as you want before you validate it. +>> > +>> > In this case, the order of a vRack alone is free. Remember your cart number (cartId), it will be required for the rest. +>> > +>> +>> **Retrieving the necessary information for the vRack order** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call will allow you to retrieve all the information needed to order the vRack. Copy the following: +>> > +>> > *cartId*, *duration*, *planCode*, and *pricingMode*. +>> > +>> +>> **Adding the vRack to the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call allows you to add the vRack to the cart by adding all the necessary information to the order. +>> > +>> > For a vRack, this would be, for example: +>> > +>> > cartId: [your cart identifier] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Once you have validated the order, you will receive an item number ("itemId"). Keep this information, it will be useful if you wish to make changes before the validation of the cart. +>> +>> **Validating the cart** +>> +>> Once you have put all the items in your cart, you will need to validate it: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > This call will validate the cart and create a purchase order ("orderId"). Keep this information, it will be necessary to validate the order. +>> > +>> +>> **Validating the final order** +>> +>> To validate the order, you have two possibilities: +>> +>> - Pass through the visible URL when the cart is validated. +>> URL example: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validate using this call: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Even if it is a €0 purchase order, it is necessary to simulate a purchase order payment (orderId). Your order form will then be validated and processing will begin. +>> > +>> +>> Once the free order has been validated, it may take a few minutes for the vRack to be activated. +>> +>> **Step 2: Adding your Public Cloud project to the vRack** +>> +>> Once the vRack is active, you will need to integrate your Public Cloud project(s) into the vRack. +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide: [First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps). +>> +>> In case the project ID is unknown, the calls below allow you to retrieve it. +>> +>> **Identifying the project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **Adding the project to the vRack** +>> +>> Once the project ID and the vRack name are known, their association is made through the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Fill in the fields with the information previously retrieved: +>> +>> - **serviceName**: vRack name in the form "pn-xxxxxx". +>> - **project**: The Public Cloud project ID in the form of a 32-character string. +>> +>> > [!primary] +>> > +>> > This call initializes the association of the project and the vRack. The task ID must then be retrieved to check the progress. +>> > +>> +>> **Checking the progress of the task** +>> +>> You can view the progress of the task with this call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > This call is optional and only allows you to check the status of the task. Once it is complete, you can proceed to the next step. +>> > +>> + +### Step 2: Creating a private network in the vRack It is necessary to create a private network with a virtual local area network (VLAN) so that the connected instances can communicate with each other. -With the Public Cloud service, you can create up to 4,000 VLANs within one vRack. This means that you can use each private IP address up to 4,000 times. +With the Public Cloud service, you can create up to 4 000 VLANs within one vRack. This means that you can use each private IP address up to 4 000 times. Thus, for example, 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42. + This can be useful in order to segment your vRack between multiple virtual networks. -In the OVHcloud Control Panel, you can assign the VLAN of your choice and customise the private IP range. +From the OVHcloud Control Panel and OVHcloud APIv6, you can customise all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g. 10.0.0.0/16), DHCP, and gateway. > [!primary] > On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires to specify your VLAN ID directly at the infrastructure level. > > Unlike dedicated servers, there is no need to tag a VLAN directly on a Public Cloud instance. > -> To learn more about this topic, please refer to the guide [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +> To learn more about this topic, please refer to the guide "[Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". > [!warning] > vRack is managed at the OVHcloud infrastructure level, meaning you can only administrate it in the OVHcloud Control Panel and the OVHcloud APIv6. @@ -148,79 +362,205 @@ In the OVHcloud Control Panel, you can assign the VLAN of your choice and custom > Because OpenStack is not located at the same level, you will not be able to customise VLANs through the Horizon interface or OpenStack APIs. > -#### Creating a private network in the OVHcloud Control Panel - -Once you have your vRack set, the next step is to create a private network. - -In the Public cloud tab, click on `Private Network`{.action} in the left-hand menu under **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. - -In step 1, select the region in which you want the private network to be located. - -![select region](images/vrack5-2024.png){.thumbnail} - -In the next step, a number of options are presented to you: - -![create network](images/vrack6-2022.png){.thumbnail} - -In the **Private Network Name** field, set a name for your private network. - -**Create a Gateway and connect to the private network** - -Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> If the option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. -> - -**Layer 2 network options** - -If you tick the `Set a VLAN ID` box, you will be able to manually choose a VLAN ID number between 0 and 4,000. - -If you do not tick the box, the system will assign a random VLAN ID number to your private network. - -If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**DHCP address distribution options** - -The default DHCP range is 10.0.0.0/16. You can use a different private range of your choice. - -Once done, click on `Create`{.action} to start the process. - -> [!primary] -> Creating the private network may take several minutes. -> - -#### Creating a private network with the OVHcloud APIv6 - -To create a private network using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) of the corresponding guide. - - -#### Creating a private network with Terraform - -In Terraform, you will need to use the openstack provider. You can download an example of a complete terraform script in [this repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -The OVHcloud specific part for vRack integration is the `value_specs` parameter. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Via the OVHcloud Control Panel +>> Once you have your vRack set, the next step is to create a private network. +>> +>> In the `Public Cloud`{.action} tab, click on `Private Network`{.action} in the left-hand menu under **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. +>> +>> To begin, select a deployment mode and the region in which you want to create the private network. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> In the next step, a number of options are presented to you: +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> In the **Private Network Name** field, set a name for your private network. +>> +>> **Layer 2 network option** +>> +>> If you tick the `Set VLAN ID`{.action} box, you will be able to manually choose a VLAN ID number between 0 and 4 000. +>> +>> If you do not tick the box, the system will assign a random VLAN ID number to your private network. +>> +>> If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **DHCP address distribution options** +>> +>> The default DHCP range is 10.1.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network. +>> +>> **Network Gateway Options** +>> +>> - **Announce the first address of a given CIDR. as the default gateway (DHCP option 3)**: When this option is enabled, the DHCP server advertises the first address in the CIDR as the default gateway to machines connected to the network. +>> - **Assign a Gateway and connect to the private network**:Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > If the second option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. +>> > +>> +>> Once done, click on `Configure your private network`{.action} to start the process. +>> +>> > [!primary] +>> > +>> > Creating the private network may take several minutes. +>> > +>> +> Via the OVHcloud APIv6 +>> +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Public Cloud project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > In the field "serviceName", specify the ID of your project. Save the vRack ID information in the form "pn-xxxxx". +>> > +>> +>> **Step 2: Creating the private network** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Fill in the fields with the information previously obtained: +>> > +>> > - **serviceName**: project ID. +>> > - **name**: name of your VLAN. +>> > +>> > You can leave the "Region" field blank in order to enable it for all regions. +>> > +>> > The VLAN identifier (vlanId) is required if you want to create a specific VLAN. +>> > +>> +>> The creation will take a few moments. +>> +>> You can check your VLAN information with the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the "networkId" in this form: name-vrack_vlanId. +>> > +>> > For example, VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Step 3: Creating a subnet** +>> +>> By default, if you do not add a subnet, the IP range used is: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> If you want to manage IP assignments yourself, you will need to create a subnet. +>> +>> To do this, once the VLAN is created, you will need to create the subnet for each affected area by the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Fill in the fields according the following table. +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the project.| +>> |networkId|Your network ID, retrieved with previous steps. Example: pn-xxxxxx_42 for VLAN 42.| +>> |dhcp|Check box for enabling / uncheck for disabling DHCP in the VLAN.| +>> |end|Last address of the subnet in this region. Example: 192.168.1.50.| +>> |network|Subnet IP block. Example: 192.168.1.0/24.| +>> |region|Example: SBG3.| +>> |start|First address of the subnet in this region. Example: 192.168.1.15.| +>> +>> > [!primary] +>> > This is the stage of creating the subnet by region. You can enable or disable private IP address assignment dynamically through DHCP. +>> > +>> > You will need to do the same for each region where your instances are present. +>> > +>> +>> > [!warning] +>> > +>> > Be careful to separate your IP address pools for different regions. For example: +>> > +>> > - From 192.168.0.2 to 192.168.0.254 for SBG1. +>> > - From 192.168.1.2 to 192.168.1.254 for GRA1. +>> > +>> +> Via Terraform +>> In Terraform, you will need to use the OpenStack provider. You can download an example of a complete terraform script in [this GitHub repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> The OVHcloud specific part for vRack integration is the `value_specs` parameter. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Via the OpenStack CLI +>> In the following example we specify the `VLAN_ID` to which we want the network to be part of through `--provider-network-type` and `--provider-segment`. +>> +>> You can remove those parameters. In that case, an available `VLAN_ID` will be used. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Step 3: Integrating an instance into vRack @@ -229,25 +569,293 @@ There are two possible scenarios: - The instance to be integrated does not exist yet. - An existing instance needs to be added to the vRack. -**In case of a new instance** - -#### In the OVHcloud Control Panel - -If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. -> To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. -> - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) of the corresponding guide. - - -**In case of an existing instance** +/// details | **In case of a new instance** + +> [!tabs] +> Via the OVHcloud Control Panel +>> If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. +>> > +>> > To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. +>> > +>> +> Via the OVHcloud APIv6 +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Retrieving the ID of the chosen instance type (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving the ID of the chosen image (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving your OpenStack SSH key ID (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> If you have not added an SSH key to your OVHcloud Control Panel yet, you can do so using the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Deploying the instance** +>> +>> Once all the elements necessary for the deployment are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |flavorId|ID of the instance type (example: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|ID of the image for the deployment (example: Debian 9, Centos 7, etc.).| +>> |name|Name for your instance.| +>> |networks|In the "networkId" section, indicate the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy). You can click the "+" button to add more networks.| +>> |region|Region for your instance deployment (example: GRA5).| +>> |sshKeyId|ID of your OpenStack SSH key.| +>> +>> Once the call is complete, if all information is correctly filled in, the instance will be created with one or more network interfaces. +>> +>> > [!warning] +>> > +>> > Depending on operating systems, you will need to manually configure your private network interfaces to be considered.
+>> > Because OpenStack is unable to prioritise the public interface of the vRack interface, the vRack interface may sometimes pass as the default route.
+>> > The direct consequence is that the instance is unreachable from a public IP.
+>> > One or more reboots of the instance from the Control Panel can resolve this situation.
+>> > The other solution is to connect to the instance via another server in the same private network. You can also correct the network configuration of the instance through Rescue mode. +>> > +>> +> Via the OpenStack CLI +>> The following steps are necessary to create an instance directly in the vRack. +>> +>> **Retrieving the required information** +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address. +>> > - The VLAN(s) required for your configuration. +>> > +>> +>> Also note the information detailed in the [Nova API user guide](/pages/public_cloud/compute/starting_with_nova): +>> +>> - ID or name of the OpenStack SSH key. +>> - ID of the instance type (flavor). +>> - ID of the desired image (operating system, snapshot, etc.). +>> +>> **Deploying the instance** +>> +>> With the previously retrieved items, an instance can be created, including it directly in the vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> You can set the IP address of the instance of your vRack interface at the OpenStack level. +>> +>> To do this, you can add a single argument to the function "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Example: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verifying the instance** +>> +>> After a few moments you can check the list of existing instances to find the server you created: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **In case of an existing instance** The OVHcloud Control Panel allows you to attach an instance to one or more private networks but does not offer advanced network interface configuration. If you want to customise further, you will need to manage them either through the OVHcloud APIv6, through the OpenStack APIs or via Horizon. @@ -260,74 +868,328 @@ For example, if you have a public interface *eth0*, you will add the interface * > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. > -#### In the OVHcloud Control Panel - -Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. - -Click on `Instances`{.action} in the left-hand navigation bar and then on `...`{.action} to the right of the instance. Select `Instance details`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -This will open the instance dashboard. Click on the `...`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. - -![attach network](images/vrack2021-01.png){.thumbnail} - -In the popup window that appears, select the private network(s) to attach to your instance and click `Attach`{.action}. - -![attach network](images/vrack9.png){.thumbnail} - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) of the corresponding guide. - -#### With OpenStack Horizon - -Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](./#horizon). - -Choose the proper work zone. - -![connection Horizon](images/horizon1.png){.thumbnail} - -Select `Compute` and then `Instances` from the menu. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Adding a private interface** - -To add an interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Select your interface and confirm. - -![Horizon attach interface](images/horizon4.png){.thumbnail} - -> [!primary] -> Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net). ->
In the instance summary, you can see the private IP address that is automatically assigned to your interface. ->
It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. -> - -**Detaching a network private interface** +> [!tabs] +> Via the OVHcloud Control Panel +>> Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. +>> +>> Click on `Instances`{.action} in the left-hand navigation bar and then on `⁝`{.action} to the right of the instance. Select `Instance details`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> This will open the instance dashboard. Click on the `⁝`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. +>> +>> ![attach network](images/vrack2021-01.png){.thumbnail} +>> +>> In the popup window that appears, select the private network(s) to attach to your instance and click `Confirm`{.action}. +>> +>> ![attach network](images/vrack9.png){.thumbnail} +>> +> Via the OVHcloud APIv6 +>> +>> If you need to integrate an existing instance into the vRack, it is not possible to do so from your OVHcloud Control Panel. You will need to use Horizon, the OpenStack API or the OVHcloud APIv6. +>> +>> The required action is simply to add a new network interface to your server, in addition to the existing one. +>> +>> For example, if you have a public interface *eth0*, you will add the interface *eth1*. +>> +>> > [!warning] +>> > +>> > The configuration of this new interface is rarely automatic. +>> > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. +>> > +>> +>> **The steps below describe how to manage the network interfaces of your instances.** +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the instance ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Step 2: Adding an interface to your instance** +>> +>> Once all the elements necessary are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> |ip|Define a specific IP (only works for private interfaces).| +>> +>> Once the call is complete, if all information is correctly filled in, a new interface will be added to your instance. +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Step 3: Removing an interface from your instance** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> Once all the necessary information is retrieved, you can use the following call to remove an interface: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> +> Via Horizon +>> Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](#horizon). +>> +>> Choose the proper work zone. +>> +>> ![connection Horizon](images/horizon1.png){.thumbnail} +>> +>> Select `Compute` and then `Instances` from the menu. +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Adding a private interface** +>> +>> To add an interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Attach Interface`{.action}. +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Detaching a network private interface** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> To detach a private interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Detach Interface`{.action}. +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Via the OpenStack CLI +>> The following steps are necessary to integrate an existing instance into the vRack. +>> +>> **Retrieving the required information** +>> +>> Identify your instances: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address +>> > - The VLAN(s) required for your configuration +>> > +>> +>> **Adding a private network interface** +>> +>> In order to attach a new interface, execute the following command: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> You can verify that the action has been performed: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => your public IP +>> | MyVLAN-42 network | 192.168.0.x | => your private IP +>> [...] +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => your public IP ; your private IP +>> [...] +>> ``` +>> + +### Removing a network interface > [!warning] +> > Detaching a network interface is permanent. > -> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it. ->
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+> This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. > -To detach a private interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Detach Interface`{.action}. +In order to detach an interface, you will first need to identify the Neutron port that has been created. +You can do this by using the following commands: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` + +or + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Once you have identified the port to remove, you can execute the following command: -Select your interface and confirm. +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +Example: -## Go further +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` + +/// -[Configuring vRack for Public Cloud using OVHcloud APIv6](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) +## Go further [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-ca.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-ca.md index c496ed11d84..83fd8002e64 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-ca.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-ca.md @@ -1,9 +1,23 @@ --- title: 'Configuring vRack for Public Cloud' excerpt: 'Find out how to set up vRack for your Public Cloud instances' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objective The OVHcloud [vRack](/links/network/vrack) is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services. At the same time, it allows you to add [Public Cloud instances](/links/public-cloud/compute) to your private network to create an infrastructure of physical and virtual resources. @@ -25,15 +39,19 @@ Depending on your technical profile and needs, it is mostly up to you which inte **To begin with, the following provides a brief description of the possible actions according to the chosen method/interface.** -### OVHcloud Control Panel +/// details | OVHcloud Control Panel -The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.x.x.x/16. +The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.1.0.0/16. The VLAN will be deployed to the selected Region. You will also have the option of activating the gateways or not, enabling DHCP distributions, etc. You can also manage billing for your services in the OVHcloud Control Panel. -### Horizon +/// + + + +/// details | Horizon The [Horizon](https://horizon.cloud.ovh.net/auth/login/) interface (independent from OVHcloud) is the original implementation of the OpenStack dashboard, which provides a web user interface to OpenStack services, including Nova, Swift, Keystone, etc. @@ -45,25 +63,32 @@ Please refer to [this guide](/pages/public_cloud/public_cloud_cross_functional/i > Horizon functions zone-specific, therefore you need to remember to choose your logical (geographic) work zone at the top left of your interface (GRA5, SBG3, BHS1, etc.). > -### OVHcloud APIv6 +/// + +/// details | OVHcloud APIv6 -Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). It even offers more possibilities than the graphical interface. +Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). +It even offers more possibilities than the graphical interface. The API interface is less visual than the OVHcloud Control Panel but will allow you to perform a large number of actions. You can manage and customise your VLAN, add interfaces to your instances, or create highly customised servers. -You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. +You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. + +This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. You may need to retrieve various information before using some API calls because a specific input is required. Please refer to [this guide](/pages/manage_and_operate/api/first-steps) to get started with the OVHcloud APIv6. -### OpenStack API +/// + +/// details | OpenStack API -Public Cloud services can be adminstrated using Linux or Windows command lines after downloading and installing OpenStack tools. +Public Cloud services can be administrated using Linux or Windows command lines after downloading and installing OpenStack tools. This method requires a good knowledge of Linux or Windows to take advantage of it, but it allows you to leverage all the power of OpenStack. -Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (object storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. +Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (Object Storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. With the OpenStack API, you can also easily automate this management through your scripts. @@ -87,60 +112,249 @@ You will then be able to use the APIs dedicated to OpenStack as needed: > You may consult the [official OpenStack documentation](https://docs.openstack.org/) if you wish to go further in learning about its use. > -For more information, consult this guide: [Configuring vRack for Public Cloud using OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | OpenStack CLI -Terraform can also be used to manage OVHcloud infrastructures. +You can manage your OVHcloud Public Cloud services and vRacks directly from your Linux or Windows terminal using the OpenStack CLI. -For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +This interface allows you to manage all OpenStack layers: -## Instructions +- Nova: instances (compute) +- Neutron: networks +- Glance: images +- Cinder: volumes -### Step 1: Activating and managing a vRack +The CLI centralizes these features and can be integrated into your scripts to automate your tasks. -#### In the OVHcloud Control Panel +Before you begin, please consult the following guides: + +- [Prepare the environment for using the OpenStack API](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Load OpenStack environment variables](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +> +> The OpenStack CLI is useful for managing your vRack, but some functions may vary depending on the version of the client or operating system. Please refer to the [official OpenStack documentation](https://docs.openstack.org/). > -If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. - -In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +/// details | Terraform -Once the service is active, you will find it in your Control Panel in the `Nerwork`{.action} section > `vRack private network`{.action}. Labelled "pn-xxxxxx". +Terraform can also be used to manage OVHcloud infrastructures. -From the list of eligible services, select the project you want to add to the vRack and click the `Add`{.action} button. +For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![add project to vrack](images/addprojectvrack.png){.thumbnail} +/// -To continue the configuration of your vRack in the OVHcloud Control Panel, skip to the section [Creating a private network in the OVHcloud Control Panel](./#creating-a-private-network-in-the-ovhcloud-control-panel) of this guide. +## Instructions -#### With the OVHcloud APIv6 +### Step 1: Activating and managing a vRack -To activate and manage a vRack using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) of the corresponding guide. +> [!warning] +> +> The vRack is managed at the OVHcloud infrastructure level, which means that you can only administer it in your OVHcloud Control Panel and the OVHcloud APIv6. +> -### Step 2: Creating a private network in the vRack +> [!tabs] +> Via the OVHcloud Control Panel +>> > [!primary] +>> > +>> > This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +>> > +>> +>> If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. +>> +>> In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. +>> +>> ![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +>> +>> Once the service is active, you will find it in your Control Panel in the `Network`{.action} section > `vRack private network`{.action}, labelled "pn-xxxxxx". +>> +>> Click on your vRack, then select the project you want to add to the vRack from the list of eligible services and click the `Add`{.action} button. +>> +>> ![add project to vrack](images/addprojectvrack.png){.thumbnail} +>> +>> To continue configuring your vRack from the OVHcloud Control Panel, continue reading this guide from [Step 2: Create a private network in the vRack](#create-pn-in-vrack), under the **From the OVHcloud Control Panel** tab. +>> +> Via the OVHcloud APIv6 +>> +>> **Step 1: Activating and managing a vRack** +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide ([First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps)) and follow these steps: +>> +>> **Creating the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > This call will create an ID for your 'shopping cart'. You can add as many articles as you want before you validate it. +>> > +>> > In this case, the order of a vRack alone is free. Remember your cart number (cartId), it will be required for the rest. +>> > +>> +>> **Retrieving the necessary information for the vRack order** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call will allow you to retrieve all the information needed to order the vRack. Copy the following: +>> > +>> > *cartId*, *duration*, *planCode*, and *pricingMode*. +>> > +>> +>> **Adding the vRack to the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call allows you to add the vRack to the cart by adding all the necessary information to the order. +>> > +>> > For a vRack, this would be, for example: +>> > +>> > cartId: [your cart identifier] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Once you have validated the order, you will receive an item number ("itemId"). Keep this information, it will be useful if you wish to make changes before the validation of the cart. +>> +>> **Validating the cart** +>> +>> Once you have put all the items in your cart, you will need to validate it: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > This call will validate the cart and create a purchase order ("orderId"). Keep this information, it will be necessary to validate the order. +>> > +>> +>> **Validating the final order** +>> +>> To validate the order, you have two possibilities: +>> +>> - Pass through the visible URL when the cart is validated. +>> URL example: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validate using this call: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Even if it is a €0 purchase order, it is necessary to simulate a purchase order payment (orderId). Your order form will then be validated and processing will begin. +>> > +>> +>> Once the free order has been validated, it may take a few minutes for the vRack to be activated. +>> +>> **Step 2: Adding your Public Cloud project to the vRack** +>> +>> Once the vRack is active, you will need to integrate your Public Cloud project(s) into the vRack. +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide: [First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps). +>> +>> In case the project ID is unknown, the calls below allow you to retrieve it. +>> +>> **Identifying the project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **Adding the project to the vRack** +>> +>> Once the project ID and the vRack name are known, their association is made through the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Fill in the fields with the information previously retrieved: +>> +>> - **serviceName**: vRack name in the form "pn-xxxxxx". +>> - **project**: The Public Cloud project ID in the form of a 32-character string. +>> +>> > [!primary] +>> > +>> > This call initializes the association of the project and the vRack. The task ID must then be retrieved to check the progress. +>> > +>> +>> **Checking the progress of the task** +>> +>> You can view the progress of the task with this call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > This call is optional and only allows you to check the status of the task. Once it is complete, you can proceed to the next step. +>> > +>> + +### Step 2: Creating a private network in the vRack It is necessary to create a private network with a virtual local area network (VLAN) so that the connected instances can communicate with each other. -With the Public Cloud service, you can create up to 4,000 VLANs within one vRack. This means that you can use each private IP address up to 4,000 times. +With the Public Cloud service, you can create up to 4 000 VLANs within one vRack. This means that you can use each private IP address up to 4 000 times. Thus, for example, 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42. + This can be useful in order to segment your vRack between multiple virtual networks. -In the OVHcloud Control Panel, you can assign the VLAN of your choice and customise the private IP range. +From the OVHcloud Control Panel and OVHcloud APIv6, you can customise all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g. 10.0.0.0/16), DHCP, and gateway. > [!primary] > On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires to specify your VLAN ID directly at the infrastructure level. > > Unlike dedicated servers, there is no need to tag a VLAN directly on a Public Cloud instance. > -> To learn more about this topic, please refer to the guide [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +> To learn more about this topic, please refer to the guide "[Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". > [!warning] > vRack is managed at the OVHcloud infrastructure level, meaning you can only administrate it in the OVHcloud Control Panel and the OVHcloud APIv6. @@ -148,79 +362,205 @@ In the OVHcloud Control Panel, you can assign the VLAN of your choice and custom > Because OpenStack is not located at the same level, you will not be able to customise VLANs through the Horizon interface or OpenStack APIs. > -#### Creating a private network in the OVHcloud Control Panel - -Once you have your vRack set, the next step is to create a private network. - -In the Public cloud tab, click on `Private Network`{.action} in the left-hand menu under **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. - -In step 1, select the region in which you want the private network to be located. - -![select region](images/vrack5-2024.png){.thumbnail} - -In the next step, a number of options are presented to you: - -![create network](images/vrack6-2022.png){.thumbnail} - -In the **Private Network Name** field, set a name for your private network. - -**Create a Gateway and connect to the private network** - -Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> If the option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. -> - -**Layer 2 network options** - -If you tick the `Set a VLAN ID` box, you will be able to manually choose a VLAN ID number between 0 and 4,000. - -If you do not tick the box, the system will assign a random VLAN ID number to your private network. - -If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**DHCP address distribution options** - -The default DHCP range is 10.0.0.0/16. You can use a different private range of your choice. - -Once done, click on `Create`{.action} to start the process. - -> [!primary] -> Creating the private network may take several minutes. -> - -#### Creating a private network with the OVHcloud APIv6 - -To create a private network using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) of the corresponding guide. - - -#### Creating a private network with Terraform - -In Terraform, you will need to use the openstack provider. You can download an example of a complete terraform script in [this repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -The OVHcloud specific part for vRack integration is the `value_specs` parameter. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Via the OVHcloud Control Panel +>> Once you have your vRack set, the next step is to create a private network. +>> +>> In the `Public Cloud`{.action} tab, click on `Private Network`{.action} in the left-hand menu under **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. +>> +>> To begin, select a deployment mode and the region in which you want to create the private network. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> In the next step, a number of options are presented to you: +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> In the **Private Network Name** field, set a name for your private network. +>> +>> **Layer 2 network option** +>> +>> If you tick the `Set VLAN ID`{.action} box, you will be able to manually choose a VLAN ID number between 0 and 4 000. +>> +>> If you do not tick the box, the system will assign a random VLAN ID number to your private network. +>> +>> If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **DHCP address distribution options** +>> +>> The default DHCP range is 10.1.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network. +>> +>> **Network Gateway Options** +>> +>> - **Announce the first address of a given CIDR. as the default gateway (DHCP option 3)**: When this option is enabled, the DHCP server advertises the first address in the CIDR as the default gateway to machines connected to the network. +>> - **Assign a Gateway and connect to the private network**:Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > If the second option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. +>> > +>> +>> Once done, click on `Configure your private network`{.action} to start the process. +>> +>> > [!primary] +>> > +>> > Creating the private network may take several minutes. +>> > +>> +> Via the OVHcloud APIv6 +>> +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Public Cloud project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > In the field "serviceName", specify the ID of your project. Save the vRack ID information in the form "pn-xxxxx". +>> > +>> +>> **Step 2: Creating the private network** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Fill in the fields with the information previously obtained: +>> > +>> > - **serviceName**: project ID. +>> > - **name**: name of your VLAN. +>> > +>> > You can leave the "Region" field blank in order to enable it for all regions. +>> > +>> > The VLAN identifier (vlanId) is required if you want to create a specific VLAN. +>> > +>> +>> The creation will take a few moments. +>> +>> You can check your VLAN information with the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the "networkId" in this form: name-vrack_vlanId. +>> > +>> > For example, VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Step 3: Creating a subnet** +>> +>> By default, if you do not add a subnet, the IP range used is: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> If you want to manage IP assignments yourself, you will need to create a subnet. +>> +>> To do this, once the VLAN is created, you will need to create the subnet for each affected area by the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Fill in the fields according the following table. +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the project.| +>> |networkId|Your network ID, retrieved with previous steps. Example: pn-xxxxxx_42 for VLAN 42.| +>> |dhcp|Check box for enabling / uncheck for disabling DHCP in the VLAN.| +>> |end|Last address of the subnet in this region. Example: 192.168.1.50.| +>> |network|Subnet IP block. Example: 192.168.1.0/24.| +>> |region|Example: SBG3.| +>> |start|First address of the subnet in this region. Example: 192.168.1.15.| +>> +>> > [!primary] +>> > This is the stage of creating the subnet by region. You can enable or disable private IP address assignment dynamically through DHCP. +>> > +>> > You will need to do the same for each region where your instances are present. +>> > +>> +>> > [!warning] +>> > +>> > Be careful to separate your IP address pools for different regions. For example: +>> > +>> > - From 192.168.0.2 to 192.168.0.254 for SBG1. +>> > - From 192.168.1.2 to 192.168.1.254 for GRA1. +>> > +>> +> Via Terraform +>> In Terraform, you will need to use the OpenStack provider. You can download an example of a complete terraform script in [this GitHub repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> The OVHcloud specific part for vRack integration is the `value_specs` parameter. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Via the OpenStack CLI +>> In the following example we specify the `VLAN_ID` to which we want the network to be part of through `--provider-network-type` and `--provider-segment`. +>> +>> You can remove those parameters. In that case, an available `VLAN_ID` will be used. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Step 3: Integrating an instance into vRack @@ -229,25 +569,293 @@ There are two possible scenarios: - The instance to be integrated does not exist yet. - An existing instance needs to be added to the vRack. -**In case of a new instance** - -#### In the OVHcloud Control Panel - -If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. -> To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. -> - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) of the corresponding guide. - - -**In case of an existing instance** +/// details | **In case of a new instance** + +> [!tabs] +> Via the OVHcloud Control Panel +>> If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. +>> > +>> > To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. +>> > +>> +> Via the OVHcloud APIv6 +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Retrieving the ID of the chosen instance type (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving the ID of the chosen image (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving your OpenStack SSH key ID (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> If you have not added an SSH key to your OVHcloud Control Panel yet, you can do so using the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Deploying the instance** +>> +>> Once all the elements necessary for the deployment are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |flavorId|ID of the instance type (example: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|ID of the image for the deployment (example: Debian 9, Centos 7, etc.).| +>> |name|Name for your instance.| +>> |networks|In the "networkId" section, indicate the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy). You can click the "+" button to add more networks.| +>> |region|Region for your instance deployment (example: GRA5).| +>> |sshKeyId|ID of your OpenStack SSH key.| +>> +>> Once the call is complete, if all information is correctly filled in, the instance will be created with one or more network interfaces. +>> +>> > [!warning] +>> > +>> > Depending on operating systems, you will need to manually configure your private network interfaces to be considered.
+>> > Because OpenStack is unable to prioritise the public interface of the vRack interface, the vRack interface may sometimes pass as the default route.
+>> > The direct consequence is that the instance is unreachable from a public IP.
+>> > One or more reboots of the instance from the Control Panel can resolve this situation.
+>> > The other solution is to connect to the instance via another server in the same private network. You can also correct the network configuration of the instance through Rescue mode. +>> > +>> +> Via the OpenStack CLI +>> The following steps are necessary to create an instance directly in the vRack. +>> +>> **Retrieving the required information** +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address. +>> > - The VLAN(s) required for your configuration. +>> > +>> +>> Also note the information detailed in the [Nova API user guide](/pages/public_cloud/compute/starting_with_nova): +>> +>> - ID or name of the OpenStack SSH key. +>> - ID of the instance type (flavor). +>> - ID of the desired image (operating system, snapshot, etc.). +>> +>> **Deploying the instance** +>> +>> With the previously retrieved items, an instance can be created, including it directly in the vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> You can set the IP address of the instance of your vRack interface at the OpenStack level. +>> +>> To do this, you can add a single argument to the function "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Example: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verifying the instance** +>> +>> After a few moments you can check the list of existing instances to find the server you created: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **In case of an existing instance** The OVHcloud Control Panel allows you to attach an instance to one or more private networks but does not offer advanced network interface configuration. If you want to customise further, you will need to manage them either through the OVHcloud APIv6, through the OpenStack APIs or via Horizon. @@ -260,74 +868,328 @@ For example, if you have a public interface *eth0*, you will add the interface * > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. > -#### In the OVHcloud Control Panel - -Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. - -Click on `Instances`{.action} in the left-hand navigation bar and then on `...`{.action} to the right of the instance. Select `Instance details`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -This will open the instance dashboard. Click on the `...`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. - -![attach network](images/vrack2021-01.png){.thumbnail} - -In the popup window that appears, select the private network(s) to attach to your instance and click `Attach`{.action}. - -![attach network](images/vrack9.png){.thumbnail} - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) of the corresponding guide. - -#### With OpenStack Horizon - -Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](./#horizon). - -Choose the proper work zone. - -![connection Horizon](images/horizon1.png){.thumbnail} - -Select `Compute` and then `Instances` from the menu. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Adding a private interface** - -To add an interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Select your interface and confirm. - -![Horizon attach interface](images/horizon4.png){.thumbnail} - -> [!primary] -> Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net). ->
In the instance summary, you can see the private IP address that is automatically assigned to your interface. ->
It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. -> - -**Detaching a network private interface** +> [!tabs] +> Via the OVHcloud Control Panel +>> Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. +>> +>> Click on `Instances`{.action} in the left-hand navigation bar and then on `⁝`{.action} to the right of the instance. Select `Instance details`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> This will open the instance dashboard. Click on the `⁝`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. +>> +>> ![attach network](images/vrack2021-01.png){.thumbnail} +>> +>> In the popup window that appears, select the private network(s) to attach to your instance and click `Confirm`{.action}. +>> +>> ![attach network](images/vrack9.png){.thumbnail} +>> +> Via the OVHcloud APIv6 +>> +>> If you need to integrate an existing instance into the vRack, it is not possible to do so from your OVHcloud Control Panel. You will need to use Horizon, the OpenStack API or the OVHcloud APIv6. +>> +>> The required action is simply to add a new network interface to your server, in addition to the existing one. +>> +>> For example, if you have a public interface *eth0*, you will add the interface *eth1*. +>> +>> > [!warning] +>> > +>> > The configuration of this new interface is rarely automatic. +>> > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. +>> > +>> +>> **The steps below describe how to manage the network interfaces of your instances.** +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the instance ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Step 2: Adding an interface to your instance** +>> +>> Once all the elements necessary are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> |ip|Define a specific IP (only works for private interfaces).| +>> +>> Once the call is complete, if all information is correctly filled in, a new interface will be added to your instance. +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Step 3: Removing an interface from your instance** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> Once all the necessary information is retrieved, you can use the following call to remove an interface: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> +> Via Horizon +>> Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](#horizon). +>> +>> Choose the proper work zone. +>> +>> ![connection Horizon](images/horizon1.png){.thumbnail} +>> +>> Select `Compute` and then `Instances` from the menu. +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Adding a private interface** +>> +>> To add an interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Attach Interface`{.action}. +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Detaching a network private interface** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> To detach a private interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Detach Interface`{.action}. +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Via the OpenStack CLI +>> The following steps are necessary to integrate an existing instance into the vRack. +>> +>> **Retrieving the required information** +>> +>> Identify your instances: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address +>> > - The VLAN(s) required for your configuration +>> > +>> +>> **Adding a private network interface** +>> +>> In order to attach a new interface, execute the following command: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> You can verify that the action has been performed: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => your public IP +>> | MyVLAN-42 network | 192.168.0.x | => your private IP +>> [...] +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => your public IP ; your private IP +>> [...] +>> ``` +>> + +### Removing a network interface > [!warning] +> > Detaching a network interface is permanent. > -> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it. ->
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+> This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. > -To detach a private interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Detach Interface`{.action}. +In order to detach an interface, you will first need to identify the Neutron port that has been created. +You can do this by using the following commands: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` + +or + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Once you have identified the port to remove, you can execute the following command: -Select your interface and confirm. +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +Example: -## Go further +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` + +/// -[Configuring vRack for Public Cloud using OVHcloud APIv6](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) +## Go further [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-gb.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-gb.md index c496ed11d84..83fd8002e64 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-gb.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-gb.md @@ -1,9 +1,23 @@ --- title: 'Configuring vRack for Public Cloud' excerpt: 'Find out how to set up vRack for your Public Cloud instances' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objective The OVHcloud [vRack](/links/network/vrack) is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services. At the same time, it allows you to add [Public Cloud instances](/links/public-cloud/compute) to your private network to create an infrastructure of physical and virtual resources. @@ -25,15 +39,19 @@ Depending on your technical profile and needs, it is mostly up to you which inte **To begin with, the following provides a brief description of the possible actions according to the chosen method/interface.** -### OVHcloud Control Panel +/// details | OVHcloud Control Panel -The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.x.x.x/16. +The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.1.0.0/16. The VLAN will be deployed to the selected Region. You will also have the option of activating the gateways or not, enabling DHCP distributions, etc. You can also manage billing for your services in the OVHcloud Control Panel. -### Horizon +/// + + + +/// details | Horizon The [Horizon](https://horizon.cloud.ovh.net/auth/login/) interface (independent from OVHcloud) is the original implementation of the OpenStack dashboard, which provides a web user interface to OpenStack services, including Nova, Swift, Keystone, etc. @@ -45,25 +63,32 @@ Please refer to [this guide](/pages/public_cloud/public_cloud_cross_functional/i > Horizon functions zone-specific, therefore you need to remember to choose your logical (geographic) work zone at the top left of your interface (GRA5, SBG3, BHS1, etc.). > -### OVHcloud APIv6 +/// + +/// details | OVHcloud APIv6 -Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). It even offers more possibilities than the graphical interface. +Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). +It even offers more possibilities than the graphical interface. The API interface is less visual than the OVHcloud Control Panel but will allow you to perform a large number of actions. You can manage and customise your VLAN, add interfaces to your instances, or create highly customised servers. -You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. +You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. + +This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. You may need to retrieve various information before using some API calls because a specific input is required. Please refer to [this guide](/pages/manage_and_operate/api/first-steps) to get started with the OVHcloud APIv6. -### OpenStack API +/// + +/// details | OpenStack API -Public Cloud services can be adminstrated using Linux or Windows command lines after downloading and installing OpenStack tools. +Public Cloud services can be administrated using Linux or Windows command lines after downloading and installing OpenStack tools. This method requires a good knowledge of Linux or Windows to take advantage of it, but it allows you to leverage all the power of OpenStack. -Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (object storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. +Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (Object Storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. With the OpenStack API, you can also easily automate this management through your scripts. @@ -87,60 +112,249 @@ You will then be able to use the APIs dedicated to OpenStack as needed: > You may consult the [official OpenStack documentation](https://docs.openstack.org/) if you wish to go further in learning about its use. > -For more information, consult this guide: [Configuring vRack for Public Cloud using OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | OpenStack CLI -Terraform can also be used to manage OVHcloud infrastructures. +You can manage your OVHcloud Public Cloud services and vRacks directly from your Linux or Windows terminal using the OpenStack CLI. -For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +This interface allows you to manage all OpenStack layers: -## Instructions +- Nova: instances (compute) +- Neutron: networks +- Glance: images +- Cinder: volumes -### Step 1: Activating and managing a vRack +The CLI centralizes these features and can be integrated into your scripts to automate your tasks. -#### In the OVHcloud Control Panel +Before you begin, please consult the following guides: + +- [Prepare the environment for using the OpenStack API](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Load OpenStack environment variables](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +> +> The OpenStack CLI is useful for managing your vRack, but some functions may vary depending on the version of the client or operating system. Please refer to the [official OpenStack documentation](https://docs.openstack.org/). > -If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. - -In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +/// details | Terraform -Once the service is active, you will find it in your Control Panel in the `Nerwork`{.action} section > `vRack private network`{.action}. Labelled "pn-xxxxxx". +Terraform can also be used to manage OVHcloud infrastructures. -From the list of eligible services, select the project you want to add to the vRack and click the `Add`{.action} button. +For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![add project to vrack](images/addprojectvrack.png){.thumbnail} +/// -To continue the configuration of your vRack in the OVHcloud Control Panel, skip to the section [Creating a private network in the OVHcloud Control Panel](./#creating-a-private-network-in-the-ovhcloud-control-panel) of this guide. +## Instructions -#### With the OVHcloud APIv6 +### Step 1: Activating and managing a vRack -To activate and manage a vRack using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) of the corresponding guide. +> [!warning] +> +> The vRack is managed at the OVHcloud infrastructure level, which means that you can only administer it in your OVHcloud Control Panel and the OVHcloud APIv6. +> -### Step 2: Creating a private network in the vRack +> [!tabs] +> Via the OVHcloud Control Panel +>> > [!primary] +>> > +>> > This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +>> > +>> +>> If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. +>> +>> In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. +>> +>> ![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +>> +>> Once the service is active, you will find it in your Control Panel in the `Network`{.action} section > `vRack private network`{.action}, labelled "pn-xxxxxx". +>> +>> Click on your vRack, then select the project you want to add to the vRack from the list of eligible services and click the `Add`{.action} button. +>> +>> ![add project to vrack](images/addprojectvrack.png){.thumbnail} +>> +>> To continue configuring your vRack from the OVHcloud Control Panel, continue reading this guide from [Step 2: Create a private network in the vRack](#create-pn-in-vrack), under the **From the OVHcloud Control Panel** tab. +>> +> Via the OVHcloud APIv6 +>> +>> **Step 1: Activating and managing a vRack** +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide ([First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps)) and follow these steps: +>> +>> **Creating the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > This call will create an ID for your 'shopping cart'. You can add as many articles as you want before you validate it. +>> > +>> > In this case, the order of a vRack alone is free. Remember your cart number (cartId), it will be required for the rest. +>> > +>> +>> **Retrieving the necessary information for the vRack order** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call will allow you to retrieve all the information needed to order the vRack. Copy the following: +>> > +>> > *cartId*, *duration*, *planCode*, and *pricingMode*. +>> > +>> +>> **Adding the vRack to the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call allows you to add the vRack to the cart by adding all the necessary information to the order. +>> > +>> > For a vRack, this would be, for example: +>> > +>> > cartId: [your cart identifier] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Once you have validated the order, you will receive an item number ("itemId"). Keep this information, it will be useful if you wish to make changes before the validation of the cart. +>> +>> **Validating the cart** +>> +>> Once you have put all the items in your cart, you will need to validate it: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > This call will validate the cart and create a purchase order ("orderId"). Keep this information, it will be necessary to validate the order. +>> > +>> +>> **Validating the final order** +>> +>> To validate the order, you have two possibilities: +>> +>> - Pass through the visible URL when the cart is validated. +>> URL example: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validate using this call: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Even if it is a €0 purchase order, it is necessary to simulate a purchase order payment (orderId). Your order form will then be validated and processing will begin. +>> > +>> +>> Once the free order has been validated, it may take a few minutes for the vRack to be activated. +>> +>> **Step 2: Adding your Public Cloud project to the vRack** +>> +>> Once the vRack is active, you will need to integrate your Public Cloud project(s) into the vRack. +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide: [First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps). +>> +>> In case the project ID is unknown, the calls below allow you to retrieve it. +>> +>> **Identifying the project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **Adding the project to the vRack** +>> +>> Once the project ID and the vRack name are known, their association is made through the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Fill in the fields with the information previously retrieved: +>> +>> - **serviceName**: vRack name in the form "pn-xxxxxx". +>> - **project**: The Public Cloud project ID in the form of a 32-character string. +>> +>> > [!primary] +>> > +>> > This call initializes the association of the project and the vRack. The task ID must then be retrieved to check the progress. +>> > +>> +>> **Checking the progress of the task** +>> +>> You can view the progress of the task with this call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > This call is optional and only allows you to check the status of the task. Once it is complete, you can proceed to the next step. +>> > +>> + +### Step 2: Creating a private network in the vRack It is necessary to create a private network with a virtual local area network (VLAN) so that the connected instances can communicate with each other. -With the Public Cloud service, you can create up to 4,000 VLANs within one vRack. This means that you can use each private IP address up to 4,000 times. +With the Public Cloud service, you can create up to 4 000 VLANs within one vRack. This means that you can use each private IP address up to 4 000 times. Thus, for example, 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42. + This can be useful in order to segment your vRack between multiple virtual networks. -In the OVHcloud Control Panel, you can assign the VLAN of your choice and customise the private IP range. +From the OVHcloud Control Panel and OVHcloud APIv6, you can customise all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g. 10.0.0.0/16), DHCP, and gateway. > [!primary] > On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires to specify your VLAN ID directly at the infrastructure level. > > Unlike dedicated servers, there is no need to tag a VLAN directly on a Public Cloud instance. > -> To learn more about this topic, please refer to the guide [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +> To learn more about this topic, please refer to the guide "[Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". > [!warning] > vRack is managed at the OVHcloud infrastructure level, meaning you can only administrate it in the OVHcloud Control Panel and the OVHcloud APIv6. @@ -148,79 +362,205 @@ In the OVHcloud Control Panel, you can assign the VLAN of your choice and custom > Because OpenStack is not located at the same level, you will not be able to customise VLANs through the Horizon interface or OpenStack APIs. > -#### Creating a private network in the OVHcloud Control Panel - -Once you have your vRack set, the next step is to create a private network. - -In the Public cloud tab, click on `Private Network`{.action} in the left-hand menu under **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. - -In step 1, select the region in which you want the private network to be located. - -![select region](images/vrack5-2024.png){.thumbnail} - -In the next step, a number of options are presented to you: - -![create network](images/vrack6-2022.png){.thumbnail} - -In the **Private Network Name** field, set a name for your private network. - -**Create a Gateway and connect to the private network** - -Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> If the option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. -> - -**Layer 2 network options** - -If you tick the `Set a VLAN ID` box, you will be able to manually choose a VLAN ID number between 0 and 4,000. - -If you do not tick the box, the system will assign a random VLAN ID number to your private network. - -If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**DHCP address distribution options** - -The default DHCP range is 10.0.0.0/16. You can use a different private range of your choice. - -Once done, click on `Create`{.action} to start the process. - -> [!primary] -> Creating the private network may take several minutes. -> - -#### Creating a private network with the OVHcloud APIv6 - -To create a private network using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) of the corresponding guide. - - -#### Creating a private network with Terraform - -In Terraform, you will need to use the openstack provider. You can download an example of a complete terraform script in [this repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -The OVHcloud specific part for vRack integration is the `value_specs` parameter. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Via the OVHcloud Control Panel +>> Once you have your vRack set, the next step is to create a private network. +>> +>> In the `Public Cloud`{.action} tab, click on `Private Network`{.action} in the left-hand menu under **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. +>> +>> To begin, select a deployment mode and the region in which you want to create the private network. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> In the next step, a number of options are presented to you: +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> In the **Private Network Name** field, set a name for your private network. +>> +>> **Layer 2 network option** +>> +>> If you tick the `Set VLAN ID`{.action} box, you will be able to manually choose a VLAN ID number between 0 and 4 000. +>> +>> If you do not tick the box, the system will assign a random VLAN ID number to your private network. +>> +>> If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **DHCP address distribution options** +>> +>> The default DHCP range is 10.1.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network. +>> +>> **Network Gateway Options** +>> +>> - **Announce the first address of a given CIDR. as the default gateway (DHCP option 3)**: When this option is enabled, the DHCP server advertises the first address in the CIDR as the default gateway to machines connected to the network. +>> - **Assign a Gateway and connect to the private network**:Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > If the second option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. +>> > +>> +>> Once done, click on `Configure your private network`{.action} to start the process. +>> +>> > [!primary] +>> > +>> > Creating the private network may take several minutes. +>> > +>> +> Via the OVHcloud APIv6 +>> +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Public Cloud project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > In the field "serviceName", specify the ID of your project. Save the vRack ID information in the form "pn-xxxxx". +>> > +>> +>> **Step 2: Creating the private network** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Fill in the fields with the information previously obtained: +>> > +>> > - **serviceName**: project ID. +>> > - **name**: name of your VLAN. +>> > +>> > You can leave the "Region" field blank in order to enable it for all regions. +>> > +>> > The VLAN identifier (vlanId) is required if you want to create a specific VLAN. +>> > +>> +>> The creation will take a few moments. +>> +>> You can check your VLAN information with the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the "networkId" in this form: name-vrack_vlanId. +>> > +>> > For example, VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Step 3: Creating a subnet** +>> +>> By default, if you do not add a subnet, the IP range used is: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> If you want to manage IP assignments yourself, you will need to create a subnet. +>> +>> To do this, once the VLAN is created, you will need to create the subnet for each affected area by the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Fill in the fields according the following table. +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the project.| +>> |networkId|Your network ID, retrieved with previous steps. Example: pn-xxxxxx_42 for VLAN 42.| +>> |dhcp|Check box for enabling / uncheck for disabling DHCP in the VLAN.| +>> |end|Last address of the subnet in this region. Example: 192.168.1.50.| +>> |network|Subnet IP block. Example: 192.168.1.0/24.| +>> |region|Example: SBG3.| +>> |start|First address of the subnet in this region. Example: 192.168.1.15.| +>> +>> > [!primary] +>> > This is the stage of creating the subnet by region. You can enable or disable private IP address assignment dynamically through DHCP. +>> > +>> > You will need to do the same for each region where your instances are present. +>> > +>> +>> > [!warning] +>> > +>> > Be careful to separate your IP address pools for different regions. For example: +>> > +>> > - From 192.168.0.2 to 192.168.0.254 for SBG1. +>> > - From 192.168.1.2 to 192.168.1.254 for GRA1. +>> > +>> +> Via Terraform +>> In Terraform, you will need to use the OpenStack provider. You can download an example of a complete terraform script in [this GitHub repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> The OVHcloud specific part for vRack integration is the `value_specs` parameter. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Via the OpenStack CLI +>> In the following example we specify the `VLAN_ID` to which we want the network to be part of through `--provider-network-type` and `--provider-segment`. +>> +>> You can remove those parameters. In that case, an available `VLAN_ID` will be used. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Step 3: Integrating an instance into vRack @@ -229,25 +569,293 @@ There are two possible scenarios: - The instance to be integrated does not exist yet. - An existing instance needs to be added to the vRack. -**In case of a new instance** - -#### In the OVHcloud Control Panel - -If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. -> To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. -> - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) of the corresponding guide. - - -**In case of an existing instance** +/// details | **In case of a new instance** + +> [!tabs] +> Via the OVHcloud Control Panel +>> If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. +>> > +>> > To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. +>> > +>> +> Via the OVHcloud APIv6 +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Retrieving the ID of the chosen instance type (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving the ID of the chosen image (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving your OpenStack SSH key ID (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> If you have not added an SSH key to your OVHcloud Control Panel yet, you can do so using the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Deploying the instance** +>> +>> Once all the elements necessary for the deployment are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |flavorId|ID of the instance type (example: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|ID of the image for the deployment (example: Debian 9, Centos 7, etc.).| +>> |name|Name for your instance.| +>> |networks|In the "networkId" section, indicate the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy). You can click the "+" button to add more networks.| +>> |region|Region for your instance deployment (example: GRA5).| +>> |sshKeyId|ID of your OpenStack SSH key.| +>> +>> Once the call is complete, if all information is correctly filled in, the instance will be created with one or more network interfaces. +>> +>> > [!warning] +>> > +>> > Depending on operating systems, you will need to manually configure your private network interfaces to be considered.
+>> > Because OpenStack is unable to prioritise the public interface of the vRack interface, the vRack interface may sometimes pass as the default route.
+>> > The direct consequence is that the instance is unreachable from a public IP.
+>> > One or more reboots of the instance from the Control Panel can resolve this situation.
+>> > The other solution is to connect to the instance via another server in the same private network. You can also correct the network configuration of the instance through Rescue mode. +>> > +>> +> Via the OpenStack CLI +>> The following steps are necessary to create an instance directly in the vRack. +>> +>> **Retrieving the required information** +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address. +>> > - The VLAN(s) required for your configuration. +>> > +>> +>> Also note the information detailed in the [Nova API user guide](/pages/public_cloud/compute/starting_with_nova): +>> +>> - ID or name of the OpenStack SSH key. +>> - ID of the instance type (flavor). +>> - ID of the desired image (operating system, snapshot, etc.). +>> +>> **Deploying the instance** +>> +>> With the previously retrieved items, an instance can be created, including it directly in the vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> You can set the IP address of the instance of your vRack interface at the OpenStack level. +>> +>> To do this, you can add a single argument to the function "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Example: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verifying the instance** +>> +>> After a few moments you can check the list of existing instances to find the server you created: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **In case of an existing instance** The OVHcloud Control Panel allows you to attach an instance to one or more private networks but does not offer advanced network interface configuration. If you want to customise further, you will need to manage them either through the OVHcloud APIv6, through the OpenStack APIs or via Horizon. @@ -260,74 +868,328 @@ For example, if you have a public interface *eth0*, you will add the interface * > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. > -#### In the OVHcloud Control Panel - -Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. - -Click on `Instances`{.action} in the left-hand navigation bar and then on `...`{.action} to the right of the instance. Select `Instance details`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -This will open the instance dashboard. Click on the `...`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. - -![attach network](images/vrack2021-01.png){.thumbnail} - -In the popup window that appears, select the private network(s) to attach to your instance and click `Attach`{.action}. - -![attach network](images/vrack9.png){.thumbnail} - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) of the corresponding guide. - -#### With OpenStack Horizon - -Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](./#horizon). - -Choose the proper work zone. - -![connection Horizon](images/horizon1.png){.thumbnail} - -Select `Compute` and then `Instances` from the menu. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Adding a private interface** - -To add an interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Select your interface and confirm. - -![Horizon attach interface](images/horizon4.png){.thumbnail} - -> [!primary] -> Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net). ->
In the instance summary, you can see the private IP address that is automatically assigned to your interface. ->
It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. -> - -**Detaching a network private interface** +> [!tabs] +> Via the OVHcloud Control Panel +>> Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. +>> +>> Click on `Instances`{.action} in the left-hand navigation bar and then on `⁝`{.action} to the right of the instance. Select `Instance details`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> This will open the instance dashboard. Click on the `⁝`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. +>> +>> ![attach network](images/vrack2021-01.png){.thumbnail} +>> +>> In the popup window that appears, select the private network(s) to attach to your instance and click `Confirm`{.action}. +>> +>> ![attach network](images/vrack9.png){.thumbnail} +>> +> Via the OVHcloud APIv6 +>> +>> If you need to integrate an existing instance into the vRack, it is not possible to do so from your OVHcloud Control Panel. You will need to use Horizon, the OpenStack API or the OVHcloud APIv6. +>> +>> The required action is simply to add a new network interface to your server, in addition to the existing one. +>> +>> For example, if you have a public interface *eth0*, you will add the interface *eth1*. +>> +>> > [!warning] +>> > +>> > The configuration of this new interface is rarely automatic. +>> > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. +>> > +>> +>> **The steps below describe how to manage the network interfaces of your instances.** +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the instance ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Step 2: Adding an interface to your instance** +>> +>> Once all the elements necessary are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> |ip|Define a specific IP (only works for private interfaces).| +>> +>> Once the call is complete, if all information is correctly filled in, a new interface will be added to your instance. +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Step 3: Removing an interface from your instance** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> Once all the necessary information is retrieved, you can use the following call to remove an interface: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> +> Via Horizon +>> Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](#horizon). +>> +>> Choose the proper work zone. +>> +>> ![connection Horizon](images/horizon1.png){.thumbnail} +>> +>> Select `Compute` and then `Instances` from the menu. +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Adding a private interface** +>> +>> To add an interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Attach Interface`{.action}. +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Detaching a network private interface** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> To detach a private interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Detach Interface`{.action}. +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Via the OpenStack CLI +>> The following steps are necessary to integrate an existing instance into the vRack. +>> +>> **Retrieving the required information** +>> +>> Identify your instances: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address +>> > - The VLAN(s) required for your configuration +>> > +>> +>> **Adding a private network interface** +>> +>> In order to attach a new interface, execute the following command: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> You can verify that the action has been performed: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => your public IP +>> | MyVLAN-42 network | 192.168.0.x | => your private IP +>> [...] +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => your public IP ; your private IP +>> [...] +>> ``` +>> + +### Removing a network interface > [!warning] +> > Detaching a network interface is permanent. > -> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it. ->
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+> This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. > -To detach a private interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Detach Interface`{.action}. +In order to detach an interface, you will first need to identify the Neutron port that has been created. +You can do this by using the following commands: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` + +or + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Once you have identified the port to remove, you can execute the following command: -Select your interface and confirm. +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +Example: -## Go further +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` + +/// -[Configuring vRack for Public Cloud using OVHcloud APIv6](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) +## Go further [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-ie.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-ie.md index c496ed11d84..83fd8002e64 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-ie.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-ie.md @@ -1,9 +1,23 @@ --- title: 'Configuring vRack for Public Cloud' excerpt: 'Find out how to set up vRack for your Public Cloud instances' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objective The OVHcloud [vRack](/links/network/vrack) is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services. At the same time, it allows you to add [Public Cloud instances](/links/public-cloud/compute) to your private network to create an infrastructure of physical and virtual resources. @@ -25,15 +39,19 @@ Depending on your technical profile and needs, it is mostly up to you which inte **To begin with, the following provides a brief description of the possible actions according to the chosen method/interface.** -### OVHcloud Control Panel +/// details | OVHcloud Control Panel -The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.x.x.x/16. +The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.1.0.0/16. The VLAN will be deployed to the selected Region. You will also have the option of activating the gateways or not, enabling DHCP distributions, etc. You can also manage billing for your services in the OVHcloud Control Panel. -### Horizon +/// + + + +/// details | Horizon The [Horizon](https://horizon.cloud.ovh.net/auth/login/) interface (independent from OVHcloud) is the original implementation of the OpenStack dashboard, which provides a web user interface to OpenStack services, including Nova, Swift, Keystone, etc. @@ -45,25 +63,32 @@ Please refer to [this guide](/pages/public_cloud/public_cloud_cross_functional/i > Horizon functions zone-specific, therefore you need to remember to choose your logical (geographic) work zone at the top left of your interface (GRA5, SBG3, BHS1, etc.). > -### OVHcloud APIv6 +/// + +/// details | OVHcloud APIv6 -Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). It even offers more possibilities than the graphical interface. +Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). +It even offers more possibilities than the graphical interface. The API interface is less visual than the OVHcloud Control Panel but will allow you to perform a large number of actions. You can manage and customise your VLAN, add interfaces to your instances, or create highly customised servers. -You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. +You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. + +This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. You may need to retrieve various information before using some API calls because a specific input is required. Please refer to [this guide](/pages/manage_and_operate/api/first-steps) to get started with the OVHcloud APIv6. -### OpenStack API +/// + +/// details | OpenStack API -Public Cloud services can be adminstrated using Linux or Windows command lines after downloading and installing OpenStack tools. +Public Cloud services can be administrated using Linux or Windows command lines after downloading and installing OpenStack tools. This method requires a good knowledge of Linux or Windows to take advantage of it, but it allows you to leverage all the power of OpenStack. -Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (object storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. +Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (Object Storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. With the OpenStack API, you can also easily automate this management through your scripts. @@ -87,60 +112,249 @@ You will then be able to use the APIs dedicated to OpenStack as needed: > You may consult the [official OpenStack documentation](https://docs.openstack.org/) if you wish to go further in learning about its use. > -For more information, consult this guide: [Configuring vRack for Public Cloud using OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | OpenStack CLI -Terraform can also be used to manage OVHcloud infrastructures. +You can manage your OVHcloud Public Cloud services and vRacks directly from your Linux or Windows terminal using the OpenStack CLI. -For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +This interface allows you to manage all OpenStack layers: -## Instructions +- Nova: instances (compute) +- Neutron: networks +- Glance: images +- Cinder: volumes -### Step 1: Activating and managing a vRack +The CLI centralizes these features and can be integrated into your scripts to automate your tasks. -#### In the OVHcloud Control Panel +Before you begin, please consult the following guides: + +- [Prepare the environment for using the OpenStack API](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Load OpenStack environment variables](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +> +> The OpenStack CLI is useful for managing your vRack, but some functions may vary depending on the version of the client or operating system. Please refer to the [official OpenStack documentation](https://docs.openstack.org/). > -If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. - -In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +/// details | Terraform -Once the service is active, you will find it in your Control Panel in the `Nerwork`{.action} section > `vRack private network`{.action}. Labelled "pn-xxxxxx". +Terraform can also be used to manage OVHcloud infrastructures. -From the list of eligible services, select the project you want to add to the vRack and click the `Add`{.action} button. +For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![add project to vrack](images/addprojectvrack.png){.thumbnail} +/// -To continue the configuration of your vRack in the OVHcloud Control Panel, skip to the section [Creating a private network in the OVHcloud Control Panel](./#creating-a-private-network-in-the-ovhcloud-control-panel) of this guide. +## Instructions -#### With the OVHcloud APIv6 +### Step 1: Activating and managing a vRack -To activate and manage a vRack using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) of the corresponding guide. +> [!warning] +> +> The vRack is managed at the OVHcloud infrastructure level, which means that you can only administer it in your OVHcloud Control Panel and the OVHcloud APIv6. +> -### Step 2: Creating a private network in the vRack +> [!tabs] +> Via the OVHcloud Control Panel +>> > [!primary] +>> > +>> > This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +>> > +>> +>> If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. +>> +>> In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. +>> +>> ![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +>> +>> Once the service is active, you will find it in your Control Panel in the `Network`{.action} section > `vRack private network`{.action}, labelled "pn-xxxxxx". +>> +>> Click on your vRack, then select the project you want to add to the vRack from the list of eligible services and click the `Add`{.action} button. +>> +>> ![add project to vrack](images/addprojectvrack.png){.thumbnail} +>> +>> To continue configuring your vRack from the OVHcloud Control Panel, continue reading this guide from [Step 2: Create a private network in the vRack](#create-pn-in-vrack), under the **From the OVHcloud Control Panel** tab. +>> +> Via the OVHcloud APIv6 +>> +>> **Step 1: Activating and managing a vRack** +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide ([First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps)) and follow these steps: +>> +>> **Creating the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > This call will create an ID for your 'shopping cart'. You can add as many articles as you want before you validate it. +>> > +>> > In this case, the order of a vRack alone is free. Remember your cart number (cartId), it will be required for the rest. +>> > +>> +>> **Retrieving the necessary information for the vRack order** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call will allow you to retrieve all the information needed to order the vRack. Copy the following: +>> > +>> > *cartId*, *duration*, *planCode*, and *pricingMode*. +>> > +>> +>> **Adding the vRack to the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call allows you to add the vRack to the cart by adding all the necessary information to the order. +>> > +>> > For a vRack, this would be, for example: +>> > +>> > cartId: [your cart identifier] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Once you have validated the order, you will receive an item number ("itemId"). Keep this information, it will be useful if you wish to make changes before the validation of the cart. +>> +>> **Validating the cart** +>> +>> Once you have put all the items in your cart, you will need to validate it: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > This call will validate the cart and create a purchase order ("orderId"). Keep this information, it will be necessary to validate the order. +>> > +>> +>> **Validating the final order** +>> +>> To validate the order, you have two possibilities: +>> +>> - Pass through the visible URL when the cart is validated. +>> URL example: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validate using this call: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Even if it is a €0 purchase order, it is necessary to simulate a purchase order payment (orderId). Your order form will then be validated and processing will begin. +>> > +>> +>> Once the free order has been validated, it may take a few minutes for the vRack to be activated. +>> +>> **Step 2: Adding your Public Cloud project to the vRack** +>> +>> Once the vRack is active, you will need to integrate your Public Cloud project(s) into the vRack. +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide: [First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps). +>> +>> In case the project ID is unknown, the calls below allow you to retrieve it. +>> +>> **Identifying the project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **Adding the project to the vRack** +>> +>> Once the project ID and the vRack name are known, their association is made through the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Fill in the fields with the information previously retrieved: +>> +>> - **serviceName**: vRack name in the form "pn-xxxxxx". +>> - **project**: The Public Cloud project ID in the form of a 32-character string. +>> +>> > [!primary] +>> > +>> > This call initializes the association of the project and the vRack. The task ID must then be retrieved to check the progress. +>> > +>> +>> **Checking the progress of the task** +>> +>> You can view the progress of the task with this call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > This call is optional and only allows you to check the status of the task. Once it is complete, you can proceed to the next step. +>> > +>> + +### Step 2: Creating a private network in the vRack It is necessary to create a private network with a virtual local area network (VLAN) so that the connected instances can communicate with each other. -With the Public Cloud service, you can create up to 4,000 VLANs within one vRack. This means that you can use each private IP address up to 4,000 times. +With the Public Cloud service, you can create up to 4 000 VLANs within one vRack. This means that you can use each private IP address up to 4 000 times. Thus, for example, 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42. + This can be useful in order to segment your vRack between multiple virtual networks. -In the OVHcloud Control Panel, you can assign the VLAN of your choice and customise the private IP range. +From the OVHcloud Control Panel and OVHcloud APIv6, you can customise all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g. 10.0.0.0/16), DHCP, and gateway. > [!primary] > On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires to specify your VLAN ID directly at the infrastructure level. > > Unlike dedicated servers, there is no need to tag a VLAN directly on a Public Cloud instance. > -> To learn more about this topic, please refer to the guide [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +> To learn more about this topic, please refer to the guide "[Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". > [!warning] > vRack is managed at the OVHcloud infrastructure level, meaning you can only administrate it in the OVHcloud Control Panel and the OVHcloud APIv6. @@ -148,79 +362,205 @@ In the OVHcloud Control Panel, you can assign the VLAN of your choice and custom > Because OpenStack is not located at the same level, you will not be able to customise VLANs through the Horizon interface or OpenStack APIs. > -#### Creating a private network in the OVHcloud Control Panel - -Once you have your vRack set, the next step is to create a private network. - -In the Public cloud tab, click on `Private Network`{.action} in the left-hand menu under **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. - -In step 1, select the region in which you want the private network to be located. - -![select region](images/vrack5-2024.png){.thumbnail} - -In the next step, a number of options are presented to you: - -![create network](images/vrack6-2022.png){.thumbnail} - -In the **Private Network Name** field, set a name for your private network. - -**Create a Gateway and connect to the private network** - -Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> If the option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. -> - -**Layer 2 network options** - -If you tick the `Set a VLAN ID` box, you will be able to manually choose a VLAN ID number between 0 and 4,000. - -If you do not tick the box, the system will assign a random VLAN ID number to your private network. - -If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**DHCP address distribution options** - -The default DHCP range is 10.0.0.0/16. You can use a different private range of your choice. - -Once done, click on `Create`{.action} to start the process. - -> [!primary] -> Creating the private network may take several minutes. -> - -#### Creating a private network with the OVHcloud APIv6 - -To create a private network using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) of the corresponding guide. - - -#### Creating a private network with Terraform - -In Terraform, you will need to use the openstack provider. You can download an example of a complete terraform script in [this repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -The OVHcloud specific part for vRack integration is the `value_specs` parameter. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Via the OVHcloud Control Panel +>> Once you have your vRack set, the next step is to create a private network. +>> +>> In the `Public Cloud`{.action} tab, click on `Private Network`{.action} in the left-hand menu under **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. +>> +>> To begin, select a deployment mode and the region in which you want to create the private network. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> In the next step, a number of options are presented to you: +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> In the **Private Network Name** field, set a name for your private network. +>> +>> **Layer 2 network option** +>> +>> If you tick the `Set VLAN ID`{.action} box, you will be able to manually choose a VLAN ID number between 0 and 4 000. +>> +>> If you do not tick the box, the system will assign a random VLAN ID number to your private network. +>> +>> If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **DHCP address distribution options** +>> +>> The default DHCP range is 10.1.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network. +>> +>> **Network Gateway Options** +>> +>> - **Announce the first address of a given CIDR. as the default gateway (DHCP option 3)**: When this option is enabled, the DHCP server advertises the first address in the CIDR as the default gateway to machines connected to the network. +>> - **Assign a Gateway and connect to the private network**:Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > If the second option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. +>> > +>> +>> Once done, click on `Configure your private network`{.action} to start the process. +>> +>> > [!primary] +>> > +>> > Creating the private network may take several minutes. +>> > +>> +> Via the OVHcloud APIv6 +>> +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Public Cloud project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > In the field "serviceName", specify the ID of your project. Save the vRack ID information in the form "pn-xxxxx". +>> > +>> +>> **Step 2: Creating the private network** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Fill in the fields with the information previously obtained: +>> > +>> > - **serviceName**: project ID. +>> > - **name**: name of your VLAN. +>> > +>> > You can leave the "Region" field blank in order to enable it for all regions. +>> > +>> > The VLAN identifier (vlanId) is required if you want to create a specific VLAN. +>> > +>> +>> The creation will take a few moments. +>> +>> You can check your VLAN information with the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the "networkId" in this form: name-vrack_vlanId. +>> > +>> > For example, VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Step 3: Creating a subnet** +>> +>> By default, if you do not add a subnet, the IP range used is: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> If you want to manage IP assignments yourself, you will need to create a subnet. +>> +>> To do this, once the VLAN is created, you will need to create the subnet for each affected area by the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Fill in the fields according the following table. +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the project.| +>> |networkId|Your network ID, retrieved with previous steps. Example: pn-xxxxxx_42 for VLAN 42.| +>> |dhcp|Check box for enabling / uncheck for disabling DHCP in the VLAN.| +>> |end|Last address of the subnet in this region. Example: 192.168.1.50.| +>> |network|Subnet IP block. Example: 192.168.1.0/24.| +>> |region|Example: SBG3.| +>> |start|First address of the subnet in this region. Example: 192.168.1.15.| +>> +>> > [!primary] +>> > This is the stage of creating the subnet by region. You can enable or disable private IP address assignment dynamically through DHCP. +>> > +>> > You will need to do the same for each region where your instances are present. +>> > +>> +>> > [!warning] +>> > +>> > Be careful to separate your IP address pools for different regions. For example: +>> > +>> > - From 192.168.0.2 to 192.168.0.254 for SBG1. +>> > - From 192.168.1.2 to 192.168.1.254 for GRA1. +>> > +>> +> Via Terraform +>> In Terraform, you will need to use the OpenStack provider. You can download an example of a complete terraform script in [this GitHub repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> The OVHcloud specific part for vRack integration is the `value_specs` parameter. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Via the OpenStack CLI +>> In the following example we specify the `VLAN_ID` to which we want the network to be part of through `--provider-network-type` and `--provider-segment`. +>> +>> You can remove those parameters. In that case, an available `VLAN_ID` will be used. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Step 3: Integrating an instance into vRack @@ -229,25 +569,293 @@ There are two possible scenarios: - The instance to be integrated does not exist yet. - An existing instance needs to be added to the vRack. -**In case of a new instance** - -#### In the OVHcloud Control Panel - -If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. -> To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. -> - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) of the corresponding guide. - - -**In case of an existing instance** +/// details | **In case of a new instance** + +> [!tabs] +> Via the OVHcloud Control Panel +>> If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. +>> > +>> > To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. +>> > +>> +> Via the OVHcloud APIv6 +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Retrieving the ID of the chosen instance type (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving the ID of the chosen image (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving your OpenStack SSH key ID (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> If you have not added an SSH key to your OVHcloud Control Panel yet, you can do so using the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Deploying the instance** +>> +>> Once all the elements necessary for the deployment are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |flavorId|ID of the instance type (example: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|ID of the image for the deployment (example: Debian 9, Centos 7, etc.).| +>> |name|Name for your instance.| +>> |networks|In the "networkId" section, indicate the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy). You can click the "+" button to add more networks.| +>> |region|Region for your instance deployment (example: GRA5).| +>> |sshKeyId|ID of your OpenStack SSH key.| +>> +>> Once the call is complete, if all information is correctly filled in, the instance will be created with one or more network interfaces. +>> +>> > [!warning] +>> > +>> > Depending on operating systems, you will need to manually configure your private network interfaces to be considered.
+>> > Because OpenStack is unable to prioritise the public interface of the vRack interface, the vRack interface may sometimes pass as the default route.
+>> > The direct consequence is that the instance is unreachable from a public IP.
+>> > One or more reboots of the instance from the Control Panel can resolve this situation.
+>> > The other solution is to connect to the instance via another server in the same private network. You can also correct the network configuration of the instance through Rescue mode. +>> > +>> +> Via the OpenStack CLI +>> The following steps are necessary to create an instance directly in the vRack. +>> +>> **Retrieving the required information** +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address. +>> > - The VLAN(s) required for your configuration. +>> > +>> +>> Also note the information detailed in the [Nova API user guide](/pages/public_cloud/compute/starting_with_nova): +>> +>> - ID or name of the OpenStack SSH key. +>> - ID of the instance type (flavor). +>> - ID of the desired image (operating system, snapshot, etc.). +>> +>> **Deploying the instance** +>> +>> With the previously retrieved items, an instance can be created, including it directly in the vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> You can set the IP address of the instance of your vRack interface at the OpenStack level. +>> +>> To do this, you can add a single argument to the function "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Example: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verifying the instance** +>> +>> After a few moments you can check the list of existing instances to find the server you created: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **In case of an existing instance** The OVHcloud Control Panel allows you to attach an instance to one or more private networks but does not offer advanced network interface configuration. If you want to customise further, you will need to manage them either through the OVHcloud APIv6, through the OpenStack APIs or via Horizon. @@ -260,74 +868,328 @@ For example, if you have a public interface *eth0*, you will add the interface * > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. > -#### In the OVHcloud Control Panel - -Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. - -Click on `Instances`{.action} in the left-hand navigation bar and then on `...`{.action} to the right of the instance. Select `Instance details`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -This will open the instance dashboard. Click on the `...`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. - -![attach network](images/vrack2021-01.png){.thumbnail} - -In the popup window that appears, select the private network(s) to attach to your instance and click `Attach`{.action}. - -![attach network](images/vrack9.png){.thumbnail} - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) of the corresponding guide. - -#### With OpenStack Horizon - -Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](./#horizon). - -Choose the proper work zone. - -![connection Horizon](images/horizon1.png){.thumbnail} - -Select `Compute` and then `Instances` from the menu. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Adding a private interface** - -To add an interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Select your interface and confirm. - -![Horizon attach interface](images/horizon4.png){.thumbnail} - -> [!primary] -> Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net). ->
In the instance summary, you can see the private IP address that is automatically assigned to your interface. ->
It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. -> - -**Detaching a network private interface** +> [!tabs] +> Via the OVHcloud Control Panel +>> Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. +>> +>> Click on `Instances`{.action} in the left-hand navigation bar and then on `⁝`{.action} to the right of the instance. Select `Instance details`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> This will open the instance dashboard. Click on the `⁝`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. +>> +>> ![attach network](images/vrack2021-01.png){.thumbnail} +>> +>> In the popup window that appears, select the private network(s) to attach to your instance and click `Confirm`{.action}. +>> +>> ![attach network](images/vrack9.png){.thumbnail} +>> +> Via the OVHcloud APIv6 +>> +>> If you need to integrate an existing instance into the vRack, it is not possible to do so from your OVHcloud Control Panel. You will need to use Horizon, the OpenStack API or the OVHcloud APIv6. +>> +>> The required action is simply to add a new network interface to your server, in addition to the existing one. +>> +>> For example, if you have a public interface *eth0*, you will add the interface *eth1*. +>> +>> > [!warning] +>> > +>> > The configuration of this new interface is rarely automatic. +>> > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. +>> > +>> +>> **The steps below describe how to manage the network interfaces of your instances.** +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the instance ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Step 2: Adding an interface to your instance** +>> +>> Once all the elements necessary are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> |ip|Define a specific IP (only works for private interfaces).| +>> +>> Once the call is complete, if all information is correctly filled in, a new interface will be added to your instance. +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Step 3: Removing an interface from your instance** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> Once all the necessary information is retrieved, you can use the following call to remove an interface: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> +> Via Horizon +>> Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](#horizon). +>> +>> Choose the proper work zone. +>> +>> ![connection Horizon](images/horizon1.png){.thumbnail} +>> +>> Select `Compute` and then `Instances` from the menu. +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Adding a private interface** +>> +>> To add an interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Attach Interface`{.action}. +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Detaching a network private interface** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> To detach a private interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Detach Interface`{.action}. +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Via the OpenStack CLI +>> The following steps are necessary to integrate an existing instance into the vRack. +>> +>> **Retrieving the required information** +>> +>> Identify your instances: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address +>> > - The VLAN(s) required for your configuration +>> > +>> +>> **Adding a private network interface** +>> +>> In order to attach a new interface, execute the following command: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> You can verify that the action has been performed: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => your public IP +>> | MyVLAN-42 network | 192.168.0.x | => your private IP +>> [...] +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => your public IP ; your private IP +>> [...] +>> ``` +>> + +### Removing a network interface > [!warning] +> > Detaching a network interface is permanent. > -> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it. ->
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+> This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. > -To detach a private interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Detach Interface`{.action}. +In order to detach an interface, you will first need to identify the Neutron port that has been created. +You can do this by using the following commands: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` + +or + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Once you have identified the port to remove, you can execute the following command: -Select your interface and confirm. +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +Example: -## Go further +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` + +/// -[Configuring vRack for Public Cloud using OVHcloud APIv6](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) +## Go further [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-sg.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-sg.md index c496ed11d84..83fd8002e64 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-sg.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-sg.md @@ -1,9 +1,23 @@ --- title: 'Configuring vRack for Public Cloud' excerpt: 'Find out how to set up vRack for your Public Cloud instances' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objective The OVHcloud [vRack](/links/network/vrack) is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services. At the same time, it allows you to add [Public Cloud instances](/links/public-cloud/compute) to your private network to create an infrastructure of physical and virtual resources. @@ -25,15 +39,19 @@ Depending on your technical profile and needs, it is mostly up to you which inte **To begin with, the following provides a brief description of the possible actions according to the chosen method/interface.** -### OVHcloud Control Panel +/// details | OVHcloud Control Panel -The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.x.x.x/16. +The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.1.0.0/16. The VLAN will be deployed to the selected Region. You will also have the option of activating the gateways or not, enabling DHCP distributions, etc. You can also manage billing for your services in the OVHcloud Control Panel. -### Horizon +/// + + + +/// details | Horizon The [Horizon](https://horizon.cloud.ovh.net/auth/login/) interface (independent from OVHcloud) is the original implementation of the OpenStack dashboard, which provides a web user interface to OpenStack services, including Nova, Swift, Keystone, etc. @@ -45,25 +63,32 @@ Please refer to [this guide](/pages/public_cloud/public_cloud_cross_functional/i > Horizon functions zone-specific, therefore you need to remember to choose your logical (geographic) work zone at the top left of your interface (GRA5, SBG3, BHS1, etc.). > -### OVHcloud APIv6 +/// + +/// details | OVHcloud APIv6 -Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). It even offers more possibilities than the graphical interface. +Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). +It even offers more possibilities than the graphical interface. The API interface is less visual than the OVHcloud Control Panel but will allow you to perform a large number of actions. You can manage and customise your VLAN, add interfaces to your instances, or create highly customised servers. -You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. +You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. + +This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. You may need to retrieve various information before using some API calls because a specific input is required. Please refer to [this guide](/pages/manage_and_operate/api/first-steps) to get started with the OVHcloud APIv6. -### OpenStack API +/// + +/// details | OpenStack API -Public Cloud services can be adminstrated using Linux or Windows command lines after downloading and installing OpenStack tools. +Public Cloud services can be administrated using Linux or Windows command lines after downloading and installing OpenStack tools. This method requires a good knowledge of Linux or Windows to take advantage of it, but it allows you to leverage all the power of OpenStack. -Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (object storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. +Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (Object Storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. With the OpenStack API, you can also easily automate this management through your scripts. @@ -87,60 +112,249 @@ You will then be able to use the APIs dedicated to OpenStack as needed: > You may consult the [official OpenStack documentation](https://docs.openstack.org/) if you wish to go further in learning about its use. > -For more information, consult this guide: [Configuring vRack for Public Cloud using OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | OpenStack CLI -Terraform can also be used to manage OVHcloud infrastructures. +You can manage your OVHcloud Public Cloud services and vRacks directly from your Linux or Windows terminal using the OpenStack CLI. -For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +This interface allows you to manage all OpenStack layers: -## Instructions +- Nova: instances (compute) +- Neutron: networks +- Glance: images +- Cinder: volumes -### Step 1: Activating and managing a vRack +The CLI centralizes these features and can be integrated into your scripts to automate your tasks. -#### In the OVHcloud Control Panel +Before you begin, please consult the following guides: + +- [Prepare the environment for using the OpenStack API](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Load OpenStack environment variables](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +> +> The OpenStack CLI is useful for managing your vRack, but some functions may vary depending on the version of the client or operating system. Please refer to the [official OpenStack documentation](https://docs.openstack.org/). > -If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. - -In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +/// details | Terraform -Once the service is active, you will find it in your Control Panel in the `Nerwork`{.action} section > `vRack private network`{.action}. Labelled "pn-xxxxxx". +Terraform can also be used to manage OVHcloud infrastructures. -From the list of eligible services, select the project you want to add to the vRack and click the `Add`{.action} button. +For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![add project to vrack](images/addprojectvrack.png){.thumbnail} +/// -To continue the configuration of your vRack in the OVHcloud Control Panel, skip to the section [Creating a private network in the OVHcloud Control Panel](./#creating-a-private-network-in-the-ovhcloud-control-panel) of this guide. +## Instructions -#### With the OVHcloud APIv6 +### Step 1: Activating and managing a vRack -To activate and manage a vRack using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) of the corresponding guide. +> [!warning] +> +> The vRack is managed at the OVHcloud infrastructure level, which means that you can only administer it in your OVHcloud Control Panel and the OVHcloud APIv6. +> -### Step 2: Creating a private network in the vRack +> [!tabs] +> Via the OVHcloud Control Panel +>> > [!primary] +>> > +>> > This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +>> > +>> +>> If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. +>> +>> In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. +>> +>> ![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +>> +>> Once the service is active, you will find it in your Control Panel in the `Network`{.action} section > `vRack private network`{.action}, labelled "pn-xxxxxx". +>> +>> Click on your vRack, then select the project you want to add to the vRack from the list of eligible services and click the `Add`{.action} button. +>> +>> ![add project to vrack](images/addprojectvrack.png){.thumbnail} +>> +>> To continue configuring your vRack from the OVHcloud Control Panel, continue reading this guide from [Step 2: Create a private network in the vRack](#create-pn-in-vrack), under the **From the OVHcloud Control Panel** tab. +>> +> Via the OVHcloud APIv6 +>> +>> **Step 1: Activating and managing a vRack** +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide ([First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps)) and follow these steps: +>> +>> **Creating the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > This call will create an ID for your 'shopping cart'. You can add as many articles as you want before you validate it. +>> > +>> > In this case, the order of a vRack alone is free. Remember your cart number (cartId), it will be required for the rest. +>> > +>> +>> **Retrieving the necessary information for the vRack order** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call will allow you to retrieve all the information needed to order the vRack. Copy the following: +>> > +>> > *cartId*, *duration*, *planCode*, and *pricingMode*. +>> > +>> +>> **Adding the vRack to the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call allows you to add the vRack to the cart by adding all the necessary information to the order. +>> > +>> > For a vRack, this would be, for example: +>> > +>> > cartId: [your cart identifier] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Once you have validated the order, you will receive an item number ("itemId"). Keep this information, it will be useful if you wish to make changes before the validation of the cart. +>> +>> **Validating the cart** +>> +>> Once you have put all the items in your cart, you will need to validate it: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > This call will validate the cart and create a purchase order ("orderId"). Keep this information, it will be necessary to validate the order. +>> > +>> +>> **Validating the final order** +>> +>> To validate the order, you have two possibilities: +>> +>> - Pass through the visible URL when the cart is validated. +>> URL example: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validate using this call: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Even if it is a €0 purchase order, it is necessary to simulate a purchase order payment (orderId). Your order form will then be validated and processing will begin. +>> > +>> +>> Once the free order has been validated, it may take a few minutes for the vRack to be activated. +>> +>> **Step 2: Adding your Public Cloud project to the vRack** +>> +>> Once the vRack is active, you will need to integrate your Public Cloud project(s) into the vRack. +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide: [First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps). +>> +>> In case the project ID is unknown, the calls below allow you to retrieve it. +>> +>> **Identifying the project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **Adding the project to the vRack** +>> +>> Once the project ID and the vRack name are known, their association is made through the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Fill in the fields with the information previously retrieved: +>> +>> - **serviceName**: vRack name in the form "pn-xxxxxx". +>> - **project**: The Public Cloud project ID in the form of a 32-character string. +>> +>> > [!primary] +>> > +>> > This call initializes the association of the project and the vRack. The task ID must then be retrieved to check the progress. +>> > +>> +>> **Checking the progress of the task** +>> +>> You can view the progress of the task with this call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > This call is optional and only allows you to check the status of the task. Once it is complete, you can proceed to the next step. +>> > +>> + +### Step 2: Creating a private network in the vRack It is necessary to create a private network with a virtual local area network (VLAN) so that the connected instances can communicate with each other. -With the Public Cloud service, you can create up to 4,000 VLANs within one vRack. This means that you can use each private IP address up to 4,000 times. +With the Public Cloud service, you can create up to 4 000 VLANs within one vRack. This means that you can use each private IP address up to 4 000 times. Thus, for example, 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42. + This can be useful in order to segment your vRack between multiple virtual networks. -In the OVHcloud Control Panel, you can assign the VLAN of your choice and customise the private IP range. +From the OVHcloud Control Panel and OVHcloud APIv6, you can customise all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g. 10.0.0.0/16), DHCP, and gateway. > [!primary] > On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires to specify your VLAN ID directly at the infrastructure level. > > Unlike dedicated servers, there is no need to tag a VLAN directly on a Public Cloud instance. > -> To learn more about this topic, please refer to the guide [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +> To learn more about this topic, please refer to the guide "[Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". > [!warning] > vRack is managed at the OVHcloud infrastructure level, meaning you can only administrate it in the OVHcloud Control Panel and the OVHcloud APIv6. @@ -148,79 +362,205 @@ In the OVHcloud Control Panel, you can assign the VLAN of your choice and custom > Because OpenStack is not located at the same level, you will not be able to customise VLANs through the Horizon interface or OpenStack APIs. > -#### Creating a private network in the OVHcloud Control Panel - -Once you have your vRack set, the next step is to create a private network. - -In the Public cloud tab, click on `Private Network`{.action} in the left-hand menu under **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. - -In step 1, select the region in which you want the private network to be located. - -![select region](images/vrack5-2024.png){.thumbnail} - -In the next step, a number of options are presented to you: - -![create network](images/vrack6-2022.png){.thumbnail} - -In the **Private Network Name** field, set a name for your private network. - -**Create a Gateway and connect to the private network** - -Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> If the option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. -> - -**Layer 2 network options** - -If you tick the `Set a VLAN ID` box, you will be able to manually choose a VLAN ID number between 0 and 4,000. - -If you do not tick the box, the system will assign a random VLAN ID number to your private network. - -If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**DHCP address distribution options** - -The default DHCP range is 10.0.0.0/16. You can use a different private range of your choice. - -Once done, click on `Create`{.action} to start the process. - -> [!primary] -> Creating the private network may take several minutes. -> - -#### Creating a private network with the OVHcloud APIv6 - -To create a private network using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) of the corresponding guide. - - -#### Creating a private network with Terraform - -In Terraform, you will need to use the openstack provider. You can download an example of a complete terraform script in [this repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -The OVHcloud specific part for vRack integration is the `value_specs` parameter. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Via the OVHcloud Control Panel +>> Once you have your vRack set, the next step is to create a private network. +>> +>> In the `Public Cloud`{.action} tab, click on `Private Network`{.action} in the left-hand menu under **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. +>> +>> To begin, select a deployment mode and the region in which you want to create the private network. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> In the next step, a number of options are presented to you: +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> In the **Private Network Name** field, set a name for your private network. +>> +>> **Layer 2 network option** +>> +>> If you tick the `Set VLAN ID`{.action} box, you will be able to manually choose a VLAN ID number between 0 and 4 000. +>> +>> If you do not tick the box, the system will assign a random VLAN ID number to your private network. +>> +>> If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **DHCP address distribution options** +>> +>> The default DHCP range is 10.1.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network. +>> +>> **Network Gateway Options** +>> +>> - **Announce the first address of a given CIDR. as the default gateway (DHCP option 3)**: When this option is enabled, the DHCP server advertises the first address in the CIDR as the default gateway to machines connected to the network. +>> - **Assign a Gateway and connect to the private network**:Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > If the second option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. +>> > +>> +>> Once done, click on `Configure your private network`{.action} to start the process. +>> +>> > [!primary] +>> > +>> > Creating the private network may take several minutes. +>> > +>> +> Via the OVHcloud APIv6 +>> +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Public Cloud project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > In the field "serviceName", specify the ID of your project. Save the vRack ID information in the form "pn-xxxxx". +>> > +>> +>> **Step 2: Creating the private network** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Fill in the fields with the information previously obtained: +>> > +>> > - **serviceName**: project ID. +>> > - **name**: name of your VLAN. +>> > +>> > You can leave the "Region" field blank in order to enable it for all regions. +>> > +>> > The VLAN identifier (vlanId) is required if you want to create a specific VLAN. +>> > +>> +>> The creation will take a few moments. +>> +>> You can check your VLAN information with the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the "networkId" in this form: name-vrack_vlanId. +>> > +>> > For example, VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Step 3: Creating a subnet** +>> +>> By default, if you do not add a subnet, the IP range used is: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> If you want to manage IP assignments yourself, you will need to create a subnet. +>> +>> To do this, once the VLAN is created, you will need to create the subnet for each affected area by the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Fill in the fields according the following table. +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the project.| +>> |networkId|Your network ID, retrieved with previous steps. Example: pn-xxxxxx_42 for VLAN 42.| +>> |dhcp|Check box for enabling / uncheck for disabling DHCP in the VLAN.| +>> |end|Last address of the subnet in this region. Example: 192.168.1.50.| +>> |network|Subnet IP block. Example: 192.168.1.0/24.| +>> |region|Example: SBG3.| +>> |start|First address of the subnet in this region. Example: 192.168.1.15.| +>> +>> > [!primary] +>> > This is the stage of creating the subnet by region. You can enable or disable private IP address assignment dynamically through DHCP. +>> > +>> > You will need to do the same for each region where your instances are present. +>> > +>> +>> > [!warning] +>> > +>> > Be careful to separate your IP address pools for different regions. For example: +>> > +>> > - From 192.168.0.2 to 192.168.0.254 for SBG1. +>> > - From 192.168.1.2 to 192.168.1.254 for GRA1. +>> > +>> +> Via Terraform +>> In Terraform, you will need to use the OpenStack provider. You can download an example of a complete terraform script in [this GitHub repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> The OVHcloud specific part for vRack integration is the `value_specs` parameter. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Via the OpenStack CLI +>> In the following example we specify the `VLAN_ID` to which we want the network to be part of through `--provider-network-type` and `--provider-segment`. +>> +>> You can remove those parameters. In that case, an available `VLAN_ID` will be used. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Step 3: Integrating an instance into vRack @@ -229,25 +569,293 @@ There are two possible scenarios: - The instance to be integrated does not exist yet. - An existing instance needs to be added to the vRack. -**In case of a new instance** - -#### In the OVHcloud Control Panel - -If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. -> To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. -> - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) of the corresponding guide. - - -**In case of an existing instance** +/// details | **In case of a new instance** + +> [!tabs] +> Via the OVHcloud Control Panel +>> If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. +>> > +>> > To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. +>> > +>> +> Via the OVHcloud APIv6 +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Retrieving the ID of the chosen instance type (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving the ID of the chosen image (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving your OpenStack SSH key ID (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> If you have not added an SSH key to your OVHcloud Control Panel yet, you can do so using the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Deploying the instance** +>> +>> Once all the elements necessary for the deployment are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |flavorId|ID of the instance type (example: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|ID of the image for the deployment (example: Debian 9, Centos 7, etc.).| +>> |name|Name for your instance.| +>> |networks|In the "networkId" section, indicate the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy). You can click the "+" button to add more networks.| +>> |region|Region for your instance deployment (example: GRA5).| +>> |sshKeyId|ID of your OpenStack SSH key.| +>> +>> Once the call is complete, if all information is correctly filled in, the instance will be created with one or more network interfaces. +>> +>> > [!warning] +>> > +>> > Depending on operating systems, you will need to manually configure your private network interfaces to be considered.
+>> > Because OpenStack is unable to prioritise the public interface of the vRack interface, the vRack interface may sometimes pass as the default route.
+>> > The direct consequence is that the instance is unreachable from a public IP.
+>> > One or more reboots of the instance from the Control Panel can resolve this situation.
+>> > The other solution is to connect to the instance via another server in the same private network. You can also correct the network configuration of the instance through Rescue mode. +>> > +>> +> Via the OpenStack CLI +>> The following steps are necessary to create an instance directly in the vRack. +>> +>> **Retrieving the required information** +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address. +>> > - The VLAN(s) required for your configuration. +>> > +>> +>> Also note the information detailed in the [Nova API user guide](/pages/public_cloud/compute/starting_with_nova): +>> +>> - ID or name of the OpenStack SSH key. +>> - ID of the instance type (flavor). +>> - ID of the desired image (operating system, snapshot, etc.). +>> +>> **Deploying the instance** +>> +>> With the previously retrieved items, an instance can be created, including it directly in the vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> You can set the IP address of the instance of your vRack interface at the OpenStack level. +>> +>> To do this, you can add a single argument to the function "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Example: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verifying the instance** +>> +>> After a few moments you can check the list of existing instances to find the server you created: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **In case of an existing instance** The OVHcloud Control Panel allows you to attach an instance to one or more private networks but does not offer advanced network interface configuration. If you want to customise further, you will need to manage them either through the OVHcloud APIv6, through the OpenStack APIs or via Horizon. @@ -260,74 +868,328 @@ For example, if you have a public interface *eth0*, you will add the interface * > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. > -#### In the OVHcloud Control Panel - -Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. - -Click on `Instances`{.action} in the left-hand navigation bar and then on `...`{.action} to the right of the instance. Select `Instance details`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -This will open the instance dashboard. Click on the `...`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. - -![attach network](images/vrack2021-01.png){.thumbnail} - -In the popup window that appears, select the private network(s) to attach to your instance and click `Attach`{.action}. - -![attach network](images/vrack9.png){.thumbnail} - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) of the corresponding guide. - -#### With OpenStack Horizon - -Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](./#horizon). - -Choose the proper work zone. - -![connection Horizon](images/horizon1.png){.thumbnail} - -Select `Compute` and then `Instances` from the menu. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Adding a private interface** - -To add an interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Select your interface and confirm. - -![Horizon attach interface](images/horizon4.png){.thumbnail} - -> [!primary] -> Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net). ->
In the instance summary, you can see the private IP address that is automatically assigned to your interface. ->
It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. -> - -**Detaching a network private interface** +> [!tabs] +> Via the OVHcloud Control Panel +>> Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. +>> +>> Click on `Instances`{.action} in the left-hand navigation bar and then on `⁝`{.action} to the right of the instance. Select `Instance details`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> This will open the instance dashboard. Click on the `⁝`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. +>> +>> ![attach network](images/vrack2021-01.png){.thumbnail} +>> +>> In the popup window that appears, select the private network(s) to attach to your instance and click `Confirm`{.action}. +>> +>> ![attach network](images/vrack9.png){.thumbnail} +>> +> Via the OVHcloud APIv6 +>> +>> If you need to integrate an existing instance into the vRack, it is not possible to do so from your OVHcloud Control Panel. You will need to use Horizon, the OpenStack API or the OVHcloud APIv6. +>> +>> The required action is simply to add a new network interface to your server, in addition to the existing one. +>> +>> For example, if you have a public interface *eth0*, you will add the interface *eth1*. +>> +>> > [!warning] +>> > +>> > The configuration of this new interface is rarely automatic. +>> > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. +>> > +>> +>> **The steps below describe how to manage the network interfaces of your instances.** +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the instance ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Step 2: Adding an interface to your instance** +>> +>> Once all the elements necessary are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> |ip|Define a specific IP (only works for private interfaces).| +>> +>> Once the call is complete, if all information is correctly filled in, a new interface will be added to your instance. +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Step 3: Removing an interface from your instance** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> Once all the necessary information is retrieved, you can use the following call to remove an interface: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> +> Via Horizon +>> Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](#horizon). +>> +>> Choose the proper work zone. +>> +>> ![connection Horizon](images/horizon1.png){.thumbnail} +>> +>> Select `Compute` and then `Instances` from the menu. +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Adding a private interface** +>> +>> To add an interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Attach Interface`{.action}. +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Detaching a network private interface** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> To detach a private interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Detach Interface`{.action}. +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Via the OpenStack CLI +>> The following steps are necessary to integrate an existing instance into the vRack. +>> +>> **Retrieving the required information** +>> +>> Identify your instances: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address +>> > - The VLAN(s) required for your configuration +>> > +>> +>> **Adding a private network interface** +>> +>> In order to attach a new interface, execute the following command: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> You can verify that the action has been performed: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => your public IP +>> | MyVLAN-42 network | 192.168.0.x | => your private IP +>> [...] +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => your public IP ; your private IP +>> [...] +>> ``` +>> + +### Removing a network interface > [!warning] +> > Detaching a network interface is permanent. > -> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it. ->
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+> This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. > -To detach a private interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Detach Interface`{.action}. +In order to detach an interface, you will first need to identify the Neutron port that has been created. +You can do this by using the following commands: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` + +or + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Once you have identified the port to remove, you can execute the following command: -Select your interface and confirm. +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +Example: -## Go further +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` + +/// -[Configuring vRack for Public Cloud using OVHcloud APIv6](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) +## Go further [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-us.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-us.md index c496ed11d84..83fd8002e64 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-us.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.en-us.md @@ -1,9 +1,23 @@ --- title: 'Configuring vRack for Public Cloud' excerpt: 'Find out how to set up vRack for your Public Cloud instances' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objective The OVHcloud [vRack](/links/network/vrack) is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services. At the same time, it allows you to add [Public Cloud instances](/links/public-cloud/compute) to your private network to create an infrastructure of physical and virtual resources. @@ -25,15 +39,19 @@ Depending on your technical profile and needs, it is mostly up to you which inte **To begin with, the following provides a brief description of the possible actions according to the chosen method/interface.** -### OVHcloud Control Panel +/// details | OVHcloud Control Panel -The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.x.x.x/16. +The [OVHcloud Control Panel](/links/manager) is a fully visual interface, ideally suited for managing multiple VLANs. You will also have the possibility to customise the private IP range, which by default is in 10.1.0.0/16. The VLAN will be deployed to the selected Region. You will also have the option of activating the gateways or not, enabling DHCP distributions, etc. You can also manage billing for your services in the OVHcloud Control Panel. -### Horizon +/// + + + +/// details | Horizon The [Horizon](https://horizon.cloud.ovh.net/auth/login/) interface (independent from OVHcloud) is the original implementation of the OpenStack dashboard, which provides a web user interface to OpenStack services, including Nova, Swift, Keystone, etc. @@ -45,25 +63,32 @@ Please refer to [this guide](/pages/public_cloud/public_cloud_cross_functional/i > Horizon functions zone-specific, therefore you need to remember to choose your logical (geographic) work zone at the top left of your interface (GRA5, SBG3, BHS1, etc.). > -### OVHcloud APIv6 +/// + +/// details | OVHcloud APIv6 -Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). It even offers more possibilities than the graphical interface. +Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](/links/api). +It even offers more possibilities than the graphical interface. The API interface is less visual than the OVHcloud Control Panel but will allow you to perform a large number of actions. You can manage and customise your VLAN, add interfaces to your instances, or create highly customised servers. -You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. +You can simply access it from [our web page](/links/api) but also use it to create your PHP or Python scripts. + +This way, you can freely automate basic tasks with scripts, optimise your own functions and much more. You may need to retrieve various information before using some API calls because a specific input is required. Please refer to [this guide](/pages/manage_and_operate/api/first-steps) to get started with the OVHcloud APIv6. -### OpenStack API +/// + +/// details | OpenStack API -Public Cloud services can be adminstrated using Linux or Windows command lines after downloading and installing OpenStack tools. +Public Cloud services can be administrated using Linux or Windows command lines after downloading and installing OpenStack tools. This method requires a good knowledge of Linux or Windows to take advantage of it, but it allows you to leverage all the power of OpenStack. -Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (object storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. +Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (Object Storage) client. The latest addition to this assortment, the OpenStack client, makes it possible to manage almost all OpenStack layers directly. With the OpenStack API, you can also easily automate this management through your scripts. @@ -87,60 +112,249 @@ You will then be able to use the APIs dedicated to OpenStack as needed: > You may consult the [official OpenStack documentation](https://docs.openstack.org/) if you wish to go further in learning about its use. > -For more information, consult this guide: [Configuring vRack for Public Cloud using OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | OpenStack CLI -Terraform can also be used to manage OVHcloud infrastructures. +You can manage your OVHcloud Public Cloud services and vRacks directly from your Linux or Windows terminal using the OpenStack CLI. -For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +This interface allows you to manage all OpenStack layers: -## Instructions +- Nova: instances (compute) +- Neutron: networks +- Glance: images +- Cinder: volumes -### Step 1: Activating and managing a vRack +The CLI centralizes these features and can be integrated into your scripts to automate your tasks. -#### In the OVHcloud Control Panel +Before you begin, please consult the following guides: + +- [Prepare the environment for using the OpenStack API](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Load OpenStack environment variables](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +> +> The OpenStack CLI is useful for managing your vRack, but some functions may vary depending on the version of the client or operating system. Please refer to the [official OpenStack documentation](https://docs.openstack.org/). > -If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. - -In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +/// details | Terraform -Once the service is active, you will find it in your Control Panel in the `Nerwork`{.action} section > `vRack private network`{.action}. Labelled "pn-xxxxxx". +Terraform can also be used to manage OVHcloud infrastructures. -From the list of eligible services, select the project you want to add to the vRack and click the `Add`{.action} button. +For that you need to cherry-pick the correct terraform provider & resource. Find more information in our guide on [using Terraform with OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![add project to vrack](images/addprojectvrack.png){.thumbnail} +/// -To continue the configuration of your vRack in the OVHcloud Control Panel, skip to the section [Creating a private network in the OVHcloud Control Panel](./#creating-a-private-network-in-the-ovhcloud-control-panel) of this guide. +## Instructions -#### With the OVHcloud APIv6 +### Step 1: Activating and managing a vRack -To activate and manage a vRack using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) of the corresponding guide. +> [!warning] +> +> The vRack is managed at the OVHcloud infrastructure level, which means that you can only administer it in your OVHcloud Control Panel and the OVHcloud APIv6. +> -### Step 2: Creating a private network in the vRack +> [!tabs] +> Via the OVHcloud Control Panel +>> > [!primary] +>> > +>> > This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go the `Network`{.action} section and click on `vRack private network`{.action} to view the vRack(s). +>> > +>> +>> If you have an older project and don't have a vRack, you need to order one. Using the vRack itself is free of charge and it can be delivered within a few minutes. +>> +>> In the left-hand menu, click the button `Add a service`{.action} (shopping cart icon). Use the filter at the top of the page or scroll down to find the service `vRack`{.action}. +>> +>> ![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account. +>> +>> Once the service is active, you will find it in your Control Panel in the `Network`{.action} section > `vRack private network`{.action}, labelled "pn-xxxxxx". +>> +>> Click on your vRack, then select the project you want to add to the vRack from the list of eligible services and click the `Add`{.action} button. +>> +>> ![add project to vrack](images/addprojectvrack.png){.thumbnail} +>> +>> To continue configuring your vRack from the OVHcloud Control Panel, continue reading this guide from [Step 2: Create a private network in the vRack](#create-pn-in-vrack), under the **From the OVHcloud Control Panel** tab. +>> +> Via the OVHcloud APIv6 +>> +>> **Step 1: Activating and managing a vRack** +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide ([First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps)) and follow these steps: +>> +>> **Creating the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > This call will create an ID for your 'shopping cart'. You can add as many articles as you want before you validate it. +>> > +>> > In this case, the order of a vRack alone is free. Remember your cart number (cartId), it will be required for the rest. +>> > +>> +>> **Retrieving the necessary information for the vRack order** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call will allow you to retrieve all the information needed to order the vRack. Copy the following: +>> > +>> > *cartId*, *duration*, *planCode*, and *pricingMode*. +>> > +>> +>> **Adding the vRack to the cart** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > This call allows you to add the vRack to the cart by adding all the necessary information to the order. +>> > +>> > For a vRack, this would be, for example: +>> > +>> > cartId: [your cart identifier] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Once you have validated the order, you will receive an item number ("itemId"). Keep this information, it will be useful if you wish to make changes before the validation of the cart. +>> +>> **Validating the cart** +>> +>> Once you have put all the items in your cart, you will need to validate it: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > This call will validate the cart and create a purchase order ("orderId"). Keep this information, it will be necessary to validate the order. +>> > +>> +>> **Validating the final order** +>> +>> To validate the order, you have two possibilities: +>> +>> - Pass through the visible URL when the cart is validated. +>> URL example: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validate using this call: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Even if it is a €0 purchase order, it is necessary to simulate a purchase order payment (orderId). Your order form will then be validated and processing will begin. +>> > +>> +>> Once the free order has been validated, it may take a few minutes for the vRack to be activated. +>> +>> **Step 2: Adding your Public Cloud project to the vRack** +>> +>> Once the vRack is active, you will need to integrate your Public Cloud project(s) into the vRack. +>> +>> Log in to the OVHcloud APIv6 interface according to the relevant guide: [First steps with the OVHcloud API](/pages/manage_and_operate/api/first-steps). +>> +>> In case the project ID is unknown, the calls below allow you to retrieve it. +>> +>> **Identifying the project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **Adding the project to the vRack** +>> +>> Once the project ID and the vRack name are known, their association is made through the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Fill in the fields with the information previously retrieved: +>> +>> - **serviceName**: vRack name in the form "pn-xxxxxx". +>> - **project**: The Public Cloud project ID in the form of a 32-character string. +>> +>> > [!primary] +>> > +>> > This call initializes the association of the project and the vRack. The task ID must then be retrieved to check the progress. +>> > +>> +>> **Checking the progress of the task** +>> +>> You can view the progress of the task with this call: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > This call is optional and only allows you to check the status of the task. Once it is complete, you can proceed to the next step. +>> > +>> + +### Step 2: Creating a private network in the vRack It is necessary to create a private network with a virtual local area network (VLAN) so that the connected instances can communicate with each other. -With the Public Cloud service, you can create up to 4,000 VLANs within one vRack. This means that you can use each private IP address up to 4,000 times. +With the Public Cloud service, you can create up to 4 000 VLANs within one vRack. This means that you can use each private IP address up to 4 000 times. Thus, for example, 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42. + This can be useful in order to segment your vRack between multiple virtual networks. -In the OVHcloud Control Panel, you can assign the VLAN of your choice and customise the private IP range. +From the OVHcloud Control Panel and OVHcloud APIv6, you can customise all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g. 10.0.0.0/16), DHCP, and gateway. > [!primary] > On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires to specify your VLAN ID directly at the infrastructure level. > > Unlike dedicated servers, there is no need to tag a VLAN directly on a Public Cloud instance. > -> To learn more about this topic, please refer to the guide [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +> To learn more about this topic, please refer to the guide "[Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". > [!warning] > vRack is managed at the OVHcloud infrastructure level, meaning you can only administrate it in the OVHcloud Control Panel and the OVHcloud APIv6. @@ -148,79 +362,205 @@ In the OVHcloud Control Panel, you can assign the VLAN of your choice and custom > Because OpenStack is not located at the same level, you will not be able to customise VLANs through the Horizon interface or OpenStack APIs. > -#### Creating a private network in the OVHcloud Control Panel - -Once you have your vRack set, the next step is to create a private network. - -In the Public cloud tab, click on `Private Network`{.action} in the left-hand menu under **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. - -In step 1, select the region in which you want the private network to be located. - -![select region](images/vrack5-2024.png){.thumbnail} - -In the next step, a number of options are presented to you: - -![create network](images/vrack6-2022.png){.thumbnail} - -In the **Private Network Name** field, set a name for your private network. - -**Create a Gateway and connect to the private network** - -Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> If the option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. -> - -**Layer 2 network options** - -If you tick the `Set a VLAN ID` box, you will be able to manually choose a VLAN ID number between 0 and 4,000. - -If you do not tick the box, the system will assign a random VLAN ID number to your private network. - -If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**DHCP address distribution options** - -The default DHCP range is 10.0.0.0/16. You can use a different private range of your choice. - -Once done, click on `Create`{.action} to start the process. - -> [!primary] -> Creating the private network may take several minutes. -> - -#### Creating a private network with the OVHcloud APIv6 - -To create a private network using the OVHcloud APIv6, please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) of the corresponding guide. - - -#### Creating a private network with Terraform - -In Terraform, you will need to use the openstack provider. You can download an example of a complete terraform script in [this repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -The OVHcloud specific part for vRack integration is the `value_specs` parameter. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Via the OVHcloud Control Panel +>> Once you have your vRack set, the next step is to create a private network. +>> +>> In the `Public Cloud`{.action} tab, click on `Private Network`{.action} in the left-hand menu under **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Click on the button `Add Private Network`{.action}. The following page allows you to customise multiple settings. +>> +>> To begin, select a deployment mode and the region in which you want to create the private network. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> In the next step, a number of options are presented to you: +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> In the **Private Network Name** field, set a name for your private network. +>> +>> **Layer 2 network option** +>> +>> If you tick the `Set VLAN ID`{.action} box, you will be able to manually choose a VLAN ID number between 0 and 4 000. +>> +>> If you do not tick the box, the system will assign a random VLAN ID number to your private network. +>> +>> If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **DHCP address distribution options** +>> +>> The default DHCP range is 10.1.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network. +>> +>> **Network Gateway Options** +>> +>> - **Announce the first address of a given CIDR. as the default gateway (DHCP option 3)**: When this option is enabled, the DHCP server advertises the first address in the CIDR as the default gateway to machines connected to the network. +>> - **Assign a Gateway and connect to the private network**:Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a private network with Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) and [Creating and connecting to your first Public Cloud instance](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > If the second option is greyed out, it means the region selected does not support it. For more information, please refer to our [regions availability](/links/public-cloud/regions-pci) page. +>> > +>> +>> Once done, click on `Configure your private network`{.action} to start the process. +>> +>> > [!primary] +>> > +>> > Creating the private network may take several minutes. +>> > +>> +> Via the OVHcloud APIv6 +>> +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Public Cloud project** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the list of projects. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > This call identifies the project via the "description" field. +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > In the field "serviceName", specify the ID of your project. Save the vRack ID information in the form "pn-xxxxx". +>> > +>> +>> **Step 2: Creating the private network** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Fill in the fields with the information previously obtained: +>> > +>> > - **serviceName**: project ID. +>> > - **name**: name of your VLAN. +>> > +>> > You can leave the "Region" field blank in order to enable it for all regions. +>> > +>> > The VLAN identifier (vlanId) is required if you want to create a specific VLAN. +>> > +>> +>> The creation will take a few moments. +>> +>> You can check your VLAN information with the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > This call retrieves the "networkId" in this form: name-vrack_vlanId. +>> > +>> > For example, VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Step 3: Creating a subnet** +>> +>> By default, if you do not add a subnet, the IP range used is: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> If you want to manage IP assignments yourself, you will need to create a subnet. +>> +>> To do this, once the VLAN is created, you will need to create the subnet for each affected area by the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Fill in the fields according the following table. +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the project.| +>> |networkId|Your network ID, retrieved with previous steps. Example: pn-xxxxxx_42 for VLAN 42.| +>> |dhcp|Check box for enabling / uncheck for disabling DHCP in the VLAN.| +>> |end|Last address of the subnet in this region. Example: 192.168.1.50.| +>> |network|Subnet IP block. Example: 192.168.1.0/24.| +>> |region|Example: SBG3.| +>> |start|First address of the subnet in this region. Example: 192.168.1.15.| +>> +>> > [!primary] +>> > This is the stage of creating the subnet by region. You can enable or disable private IP address assignment dynamically through DHCP. +>> > +>> > You will need to do the same for each region where your instances are present. +>> > +>> +>> > [!warning] +>> > +>> > Be careful to separate your IP address pools for different regions. For example: +>> > +>> > - From 192.168.0.2 to 192.168.0.254 for SBG1. +>> > - From 192.168.1.2 to 192.168.1.254 for GRA1. +>> > +>> +> Via Terraform +>> In Terraform, you will need to use the OpenStack provider. You can download an example of a complete terraform script in [this GitHub repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> The OVHcloud specific part for vRack integration is the `value_specs` parameter. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Via the OpenStack CLI +>> In the following example we specify the `VLAN_ID` to which we want the network to be part of through `--provider-network-type` and `--provider-segment`. +>> +>> You can remove those parameters. In that case, an available `VLAN_ID` will be used. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Step 3: Integrating an instance into vRack @@ -229,25 +569,293 @@ There are two possible scenarios: - The instance to be integrated does not exist yet. - An existing instance needs to be added to the vRack. -**In case of a new instance** - -#### In the OVHcloud Control Panel - -If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. -> To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. -> - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) of the corresponding guide. - - -**In case of an existing instance** +/// details | **In case of a new instance** + +> [!tabs] +> Via the OVHcloud Control Panel +>> If you need assistance, follow this guide first: [Creating an instance in the OVHcloud Control Panel](/pages/public_cloud/compute/public-cloud-first-steps). When creating an instance, you can choose, in Step 5, a network mode, followed by a private network to integrate your instance into. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > You will be able to connect your instance to **only one** vRack from the OVHcloud Control Panel. +>> > +>> > To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs. +>> > +>> +> Via the OVHcloud APIv6 +>> Once logged in to the [OVHcloud APIv6 interface](/links/api), follow these steps: +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Retrieving the ID of the chosen instance type (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving the ID of the chosen image (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > You can limit the list by specifying the creation region of your instance. +>> > +>> +>> **Retrieving your OpenStack SSH key ID (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> If you have not added an SSH key to your OVHcloud Control Panel yet, you can do so using the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Deploying the instance** +>> +>> Once all the elements necessary for the deployment are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |flavorId|ID of the instance type (example: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|ID of the image for the deployment (example: Debian 9, Centos 7, etc.).| +>> |name|Name for your instance.| +>> |networks|In the "networkId" section, indicate the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy). You can click the "+" button to add more networks.| +>> |region|Region for your instance deployment (example: GRA5).| +>> |sshKeyId|ID of your OpenStack SSH key.| +>> +>> Once the call is complete, if all information is correctly filled in, the instance will be created with one or more network interfaces. +>> +>> > [!warning] +>> > +>> > Depending on operating systems, you will need to manually configure your private network interfaces to be considered.
+>> > Because OpenStack is unable to prioritise the public interface of the vRack interface, the vRack interface may sometimes pass as the default route.
+>> > The direct consequence is that the instance is unreachable from a public IP.
+>> > One or more reboots of the instance from the Control Panel can resolve this situation.
+>> > The other solution is to connect to the instance via another server in the same private network. You can also correct the network configuration of the instance through Rescue mode. +>> > +>> +> Via the OpenStack CLI +>> The following steps are necessary to create an instance directly in the vRack. +>> +>> **Retrieving the required information** +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address. +>> > - The VLAN(s) required for your configuration. +>> > +>> +>> Also note the information detailed in the [Nova API user guide](/pages/public_cloud/compute/starting_with_nova): +>> +>> - ID or name of the OpenStack SSH key. +>> - ID of the instance type (flavor). +>> - ID of the desired image (operating system, snapshot, etc.). +>> +>> **Deploying the instance** +>> +>> With the previously retrieved items, an instance can be created, including it directly in the vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Example: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> You can set the IP address of the instance of your vRack interface at the OpenStack level. +>> +>> To do this, you can add a single argument to the function "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Example: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verifying the instance** +>> +>> After a few moments you can check the list of existing instances to find the server you created: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **In case of an existing instance** The OVHcloud Control Panel allows you to attach an instance to one or more private networks but does not offer advanced network interface configuration. If you want to customise further, you will need to manage them either through the OVHcloud APIv6, through the OpenStack APIs or via Horizon. @@ -260,74 +868,328 @@ For example, if you have a public interface *eth0*, you will add the interface * > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. > -#### In the OVHcloud Control Panel - -Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. - -Click on `Instances`{.action} in the left-hand navigation bar and then on `...`{.action} to the right of the instance. Select `Instance details`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -This will open the instance dashboard. Click on the `...`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. - -![attach network](images/vrack2021-01.png){.thumbnail} - -In the popup window that appears, select the private network(s) to attach to your instance and click `Attach`{.action}. - -![attach network](images/vrack9.png){.thumbnail} - -#### With the OVHcloud APIv6 - -Please refer to [this section](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) of the corresponding guide. - -#### With OpenStack Horizon - -Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](./#horizon). - -Choose the proper work zone. - -![connection Horizon](images/horizon1.png){.thumbnail} - -Select `Compute` and then `Instances` from the menu. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Adding a private interface** - -To add an interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Select your interface and confirm. - -![Horizon attach interface](images/horizon4.png){.thumbnail} - -> [!primary] -> Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net). ->
In the instance summary, you can see the private IP address that is automatically assigned to your interface. ->
It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. -> - -**Detaching a network private interface** +> [!tabs] +> Via the OVHcloud Control Panel +>> Log in to the [OVHcloud Control Panel](/links/manager), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned. +>> +>> Click on `Instances`{.action} in the left-hand navigation bar and then on `⁝`{.action} to the right of the instance. Select `Instance details`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> This will open the instance dashboard. Click on the `⁝`{.action} button in the box "Networks", next to "Private networks", and select `Attach a network`{.action}. +>> +>> ![attach network](images/vrack2021-01.png){.thumbnail} +>> +>> In the popup window that appears, select the private network(s) to attach to your instance and click `Confirm`{.action}. +>> +>> ![attach network](images/vrack9.png){.thumbnail} +>> +> Via the OVHcloud APIv6 +>> +>> If you need to integrate an existing instance into the vRack, it is not possible to do so from your OVHcloud Control Panel. You will need to use Horizon, the OpenStack API or the OVHcloud APIv6. +>> +>> The required action is simply to add a new network interface to your server, in addition to the existing one. +>> +>> For example, if you have a public interface *eth0*, you will add the interface *eth1*. +>> +>> > [!warning] +>> > +>> > The configuration of this new interface is rarely automatic. +>> > You will therefore need to set a static IP or configure DHCP, depending on your infrastructure. +>> > +>> +>> **The steps below describe how to manage the network interfaces of your instances.** +>> +>> **Step 1: Retrieving the required information** +>> +>> **Retrieving the project ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Retrieving the instance ID** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Retrieving the networkID of the public network (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Retrieving the networkID of the private network (vRack interface previously created)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > The identifier will have the form: "pn-xxxxx_yy" in which yy is the VLAN number. +>> > +>> +>> **Step 2: Adding an interface to your instance** +>> +>> Once all the elements necessary are gathered, you can use the following call: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> |ip|Define a specific IP (only works for private interfaces).| +>> +>> Once the call is complete, if all information is correctly filled in, a new interface will be added to your instance. +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Step 3: Removing an interface from your instance** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> Once all the necessary information is retrieved, you can use the following call to remove an interface: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> You will need to fill in at least the following fields: +>> +>> |Field|Description| +>> |---|---| +>> |serviceName|ID of the Public Cloud project.| +>> |instanceId|ID of the instance.| +>> |networkId|Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy).| +>> +> Via Horizon +>> Log in to the [Horizon interface](https://horizon.cloud.ovh.net/auth/login/) as mentioned [above](#horizon). +>> +>> Choose the proper work zone. +>> +>> ![connection Horizon](images/horizon1.png){.thumbnail} +>> +>> Select `Compute` and then `Instances` from the menu. +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Adding a private interface** +>> +>> To add an interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Attach Interface`{.action}. +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
+>> > In the instance summary, you can see the private IP address that is automatically assigned to your interface.
+>> > It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration. +>> > +>> +>> **Detaching a network private interface** +>> +>> > [!warning] +>> > +>> > Detaching a network interface is permanent. +>> > +>> > However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+>> > This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +>> > +>> +>> To detach a private interface, click on the arrow in the `Actions` column to access the possible actions on the instance. Select `Detach Interface`{.action}. +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Select your interface and confirm. +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Via the OpenStack CLI +>> The following steps are necessary to integrate an existing instance into the vRack. +>> +>> **Retrieving the required information** +>> +>> Identify your instances: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Public and private networks: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> or +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > You will need to note the network IDs of interest: +>> > +>> > - Ext-Net for a public IP address +>> > - The VLAN(s) required for your configuration +>> > +>> +>> **Adding a private network interface** +>> +>> In order to attach a new interface, execute the following command: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Example: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> You can verify that the action has been performed: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => your public IP +>> | MyVLAN-42 network | 192.168.0.x | => your private IP +>> [...] +>> ``` +>> +>> or +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => your public IP ; your private IP +>> [...] +>> ``` +>> + +### Removing a network interface > [!warning] +> > Detaching a network interface is permanent. > -> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it. ->
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. +> However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
+> This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs. > -To detach a private interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select `Detach Interface`{.action}. +In order to detach an interface, you will first need to identify the Neutron port that has been created. +You can do this by using the following commands: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` + +or + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Once you have identified the port to remove, you can execute the following command: -Select your interface and confirm. +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +Example: -## Go further +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` + +/// -[Configuring vRack for Public Cloud using OVHcloud APIv6](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) +## Go further [Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.es-es.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.es-es.md index 0bddab29cd3..01bc8561977 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.es-es.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.es-es.md @@ -1,340 +1,1194 @@ --- title: 'Configuración del vRack Public Cloud' excerpt: 'Cómo configurar el vRack para sus instancias Public Cloud' -updated: 2025-04-28 +updated: 2025-12-23 --- + ## Objetivo -El [vRack](/links/network/vrack) OVHcloud es una solución de red privada que permite configurar el direccionamiento entre varios servidores dedicados de OVHcloud. Al mismo tiempo, le permite agregar [instancias de Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps) a su red privada para crear una infraestructura de recursos físicos y virtuales. +El [vRack](/links/network/vrack) es una red privada que le permite configurar la dirección entre varios Servidores dedicados de OVHcloud. Pero también le permite añadir [instancias Public Cloud](/links/public-cloud/Compute) a su red privada para crear una infraestructura de recursos físicos y virtuales. -**Esta guía le ayudará a configurar sus instancias de Public Cloud en el vRack.** +**Este guía tiene como objetivo acompañarle en la configuración de sus instancias Public Cloud dentro de su vRack.** ## Requisitos -- Tener un [proyecto de Public Cloud.](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) -- Haber iniciado sesión en el [área de cliente de OVHcloud](/links/manager). -- Haber [creado un usuario de OpenStack](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user) (opcional). -- Conocimientos básicos de redes. +- Tener un [proyecto Public Cloud](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) +- Estar conectado a su [área de cliente de OVHcloud](/links/manager) +- Tener [creado un usuario OpenStack](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user) (opcional) +- Conocimientos básicos de redes ## Presentación de las interfaces -La creación de un vRack o la adición de una instancia a la red se pueden realizar mediante el área de cliente de OVHcloud, las APIv6 de OVHcloud, las API de OpenStack, la interfaz Horizon o Terraform. +Ya sea para crear su vRack o para añadir una instancia en esta red, puede que tenga que utilizar el área de cliente de OVHcloud, las APIv6 de OVHcloud, las API OpenStack, la interfaz Horizon o Terraform. -Según su perfil técnico y sus necesidades, deberá elegir qué interfaz o método utilizar. Así pues, para cada acción, le proponemos los distintos pasos posibles. +Según su perfil técnico y sus necesidades, puede que tenga que elegir qué interfaz o método utilizar. Así, para cada acción, le propondremos las diferentes opciones posibles. -**Para empezar, a continuación se proporciona una breve descripción de las posibles acciones según el método/interfaz elegido.** +**A continuación, se muestra un breve descriptivo de las acciones posibles según el método o interfaz elegido:** -### Área de cliente de OVHcloud +/// details | área de cliente de OVHcloud -El [área de cliente de OVHcloud](/links/manager) es una interfaz completa y únicamente visual, lo que la convierte en una interfaz ideal para la gestión de varias VLAN. También podrá personalizar el rango de IP privadas, que por defecto es 10.x.x.x/16. +[El área de cliente de OVHcloud](/links/manager) es una interfaz completamente y exclusivamente visual, lo que la convierte en una interfaz ideal para la gestión de varios VLAN. También tendrá la posibilidad de personalizar el rango de IP privada, que por defecto es 10.1.0.0/16. -Las VLAN se desplegarán en la Región seleccionada. También podrá activar las puertas de enlace, las distribuciones DHCP, etc. +Los VLAN se desplegarán en la región seleccionada. También tendrá la posibilidad de activar o no las pasarelas, activar las distribuciones DHCP, etc. -También podrá gestionar la facturación de sus servicios desde el área de cliente de OVHcloud. +También podrá gestionar la facturación de sus servicios a través de su área de cliente de OVHcloud. -### Interfaz Horizon +/// -Interfaz visual independiente de OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) es la implementación original del panel de control de OpenStack, que proporciona una interfaz de usuario web a los servicios OpenStack, incluyendo Nova, Swift, Keystone, etc. + -Esta completa interfaz técnica le permite gestionar casi todas las acciones de OpenStack. Será una de las interfaces necesarias si desea gestionar más de dos VLAN, añadir interfaces de red privadas a sus instancias, gestionar imágenes personalizadas, etc. +/// details | Interfaz Horizon -Consulte la guía [Conectarse a Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) para familiarizarse con Horizon. +Interfaz visual independiente de OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) es la implementación original del panel de control de OpenStack, que proporciona una interfaz de usuario web a los servicios OpenStack, entre ellos Nova, Swift, Keystone, etc. + +Esta interfaz completa y técnica le permite gestionar casi todas las acciones de OpenStack. Será una de las interfaces necesarias si desea gestionar más de dos VLAN, añadir interfaces de red privadas a sus instancias, gestionar imágenes personalizadas, etc. + +Consulte el guía "[Presentación de Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon)" para familiarizarse con Horizon. > [!primary] -> Horizon que funciona por zonas. No olvide elegir su zona geográfica de trabajo en la parte superior izquierda de su interfaz (GRA5, SBG3, BHS1, etc.). +> Como Horizon funciona por zonas, recuerde elegir su zona geográfica de trabajo en la parte superior izquierda de su interfaz (GRA5, SBG3, BHS1, etc.) > -### OVHcloud APIv6 +/// + +/// details | APIv6 OVHcloud -Cada acción que realice en el área de cliente de OVHcloud recurre a las [APIv6 de OVHcloud](/links/api). -Puede incluso ir más lejos en las API que en el área de cliente. +Cada acción que realice en el área de cliente de OVHcloud llama a las [APIv6 de OVHcloud](/links/api). +Incluso puede ir más allá en las API que en su espacio cliente. -La interfaz es menos visual que el área de cliente de OVHcloud, pero le permitirá realizar un gran número de acciones. De este modo, podrá gestionar y personalizar sus VLAN, añadir interfaces a sus instancias o crear servidores altamente personalizados. +La interfaz es menos visual que el área de cliente de OVHcloud, pero le permitirá realizar un gran número de acciones. Podrá gestionar y personalizar sus VLAN, añadir interfaces a sus instancias o crear servidores altamente personalizados. -A veces deberá obtener más información antes de utilizar una API específica. +A veces será necesario recuperar varias informaciones antes de utilizar una API específica. -Solo tiene que acceder a las API desde [nuestra página web](/links/api), pero también puede crear sus scripts PHP o Python para llamar. +Puede acceder fácilmente a las API desde [nuestra página web](/links/api), pero también crear sus scripts PHP o Python para llamarlas. De este modo, podrá automatizar libremente las tareas básicas mediante scripts, optimizar sus propias funciones, etc. -Consulte la guía [Primeros pasos con las API de OVHcloud](/pages/manage_and_operate/api/first-steps), para familiarizarse con el uso de las APIv6 de OVHcloud. +Consulte el guía "["Primeros pasos con las API de OVHcloud](/pages/manage_and_operate/api/first-steps)" para familiarizarse con el uso de las APIv6 de OVHcloud. -### API OpenStack +/// -Una vez que haya descargado e instalado las herramientas OpenStack, es posible administrar los servicios de Public Cloud con comandos Linux o Windows. +/// details | API OpenStack -Este método requiere conocimientos Linux o Windows para aprovecharlo, pero permite disfrutar de toda la potencia de OpenStack a través de este método. +Es posible administrar los servicios Public Cloud mediante líneas de comandos de Linux o Windows, después de descargar e instalar las herramientas OpenStack. -Según la capa que quiera gestionar, deberá utilizar el cliente **Nova** (Compute), **Neutron** (red), **Glance** (Image) o **Swift** (Object Storage). El último hijo de la familia, el cliente OpenStack, le permite gestionar directamente las capas de OpenStack. +Este método requiere buenos conocimientos de Linux o Windows para aprovecharlo, pero le permite aprovechar toda la potencia de OpenStack mediante este medio. -Gracias a la API de OpenStack, también puede automatizar esta gestión a través de sus scripts. +Según la capa que desee gestionar, deberá utilizar el cliente Nova (Compute), Neutron (red), Glance (Imagen) o también Swift (Object Storage). El último nacido de la familia, el cliente OpenStack, le permite gestionar directamente casi todas las capas de OpenStack. -Para familiarizarse con la API de OpenStack, consulte las siguientes guías: +Gracias a la API OpenStack, también puede automatizar fácilmente esta gestión a través de sus scripts. -- [Preparar el entorno para utilizar la API de OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +Para familiarizarse con la API OpenStack, consulte primero los siguientes guías: + +- [Preparar el entorno para utilizar la API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) - [Cargar las variables de entorno necesarias para OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) -En ese caso, podrá utilizar las siguientes API dedicadas a OpenStack: +Podrá, según su necesidad, utilizar las API dedicadas a OpenStack: -- Nova (compute) -- Glance (image) -- Cinder (image) -- Neutron (network) +- Nova (Compute) +- Glance (imagen) +- Cinder (imagen) +- Neutron (red) > [!primary] -> En algunos casos será más fácil utilizar las API OpenStack y en otros, las API Nova, Neutron, etc. +> En algunos casos, será más sencillo utilizar las API OpenStack y en otros, las API Nova, Neutron, etc. > -> Asimismo, algunas funcionalidades pueden estar ausentes de la API OpenStack en función de la versión de su cliente y su sistema operativo. -En esta guía, hemos elegido las alternativas más sencillas e intuitivas. -Si desea más información sobre su uso, consulte la [documentación oficial de OpenStack](https://docs.openstack.org/). +> Del mismo modo, ciertas funcionalidades pueden faltar en la API OpenStack según la versión de su cliente y de su sistema operativo. +> En el marco de este guía, se ha optado por proponerle las alternativas más sencillas y intuitivas. +> Puede consultar en cualquier momento la [documentación oficial de OpenStack](https://docs.openstack.org/fr/) si desea profundizar en su uso. > -Para más información, consulte esta guía: [Configuración del vRack Public Cloud con OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | CLI OpenStack -Terraform también permite gestionar las infraestructuras de OVHcloud. +Puede gestionar sus servicios Public Cloud y su vRack de OVHcloud directamente desde su terminal Linux o Windows gracias a la CLI OpenStack. -Para ello, elija el proveedor y el recurso de Terraform adecuados. Para más información, consulte nuestra [guía de uso de Terraform (EN)](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +Esta interfaz permite gestionar todas las capas OpenStack: -## Procedimiento +- Nova: instancias (Compute) +- Neutron: redes +- Glance: imágenes +- Cinder: volúmenes -### Etapa 1: Activar y gestionar un vRack +La CLI centraliza estas funcionalidades y puede integrarse en sus scripts para automatizar sus tareas. -#### Desde el área de cliente de OVHcloud +Antes de comenzar, consulte los siguientes guías: + +- [Preparar el entorno para utilizar la API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Cargar las variables de entorno necesarias para OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> No se aplicará a los proyectos recién creados que se entreguen automáticamente con un vRack. Para ver el vRack una vez creado el proyecto, acceda al menú `Network`{.action} en la pestaña de la izquierda e haga clic en `Red privada vRack`{.action} para ver el vRack(s). +> +> La CLI OpenStack es útil para gestionar su vRack, sin embargo ciertas funciones pueden variar según la versión del cliente o del sistema operativo. Consulte la [documentación oficial de OpenStack](https://docs.openstack.org/fr/). > -Si tiene un proyecto más antiguo y no tiene un vRack, debe contratar uno. Este producto es gratuito y solo tarda unos minutos en estar disponible. - -En el menú situado a la izquierda de la pantalla, haga clic en el botón `Añadir un servicio`{.action} (icono de cesta de la compra). Utilice el filtro en la parte superior de la página o desplácese hacia abajo para encontrar el servicio `vRack`{.action}. - -![Contratar el vRack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} - -Será redirigido a otra página para validar el pedido. La operación tardará unos minutos. - -Una vez activado el servicio, puede consultarlo en el área de cliente, en la sección `Network`{.action} > `Red privada vRack`{.action}. Bajo la denominación «pn-xxxxx». +/// -En la lista de servicios compatibles, seleccione el proyecto que quiera añadir al vRack y haga clic en el botón `Añadir`{.action}. +/// details | Terraform -![agregar proyecto](images/addprojectvrack.png){.thumbnail} +Terraform también permite gestionar las infraestructuras de OVHcloud. -Para continuar la configuración del vRack desde el área de cliente de OVHcloud, continúe leyendo esta guía: [Crear una red privada desde el área de cliente de OVHcloud](./#crear-una-red-privada-desde-el-área-de-cliente-de-ovhcloud). +Para ello, debe elegir el proveedor y el recurso Terraform adecuados. Encuentre más información en nuestro [guía de uso de Terraform](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -#### Desde la APIv6 de OVHcloud +/// -Para activar y gestionar un vRack desde la APIv6 de OVHcloud, haga clic [aquí](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) (EN), para consultar la guía específica sobre este método. +## Procedimiento -### Etapa 2: Crear una red privada en el vRack +### Paso 1: Activar y gestionar un vRack -Es necesario crear una red privada con una red de área local virtual (VLAN) para que las instancias conectadas al vRack puedan comunicarse entre sí. +> [!warning] +> +> El vRack se gestiona a nivel de infraestructura de OVHcloud, lo que significa que solo puede administrarlo desde su área de cliente y las APIv6 de OVHcloud. +> -En la solución Public Cloud, puede crear hasta 4000 VLAN en un único vRack. Esto significa que puede utilizar cada dirección IP privada hasta 4000 veces. +> [!tabs] +> Desde el área de cliente de OVHcloud +>> > [!primary] +>> > +>> > Este paso no se aplica a los proyectos recientemente creados, que ahora se entregan automáticamente con un vRack. Para visualizar el vRack una vez creado el proyecto, vaya a la sección `Network`{.action} y haga clic en `Red privada vRack`{.action} para ver el o los vRacks. +>> > +>> +>> Si tiene un proyecto más antiguo y no dispone de un vRack, deberá pedirlo. Este producto es gratuito y la entrega solo tarda unos minutos. +>> +>> En el menú situado a la izquierda de la pantalla, haga clic en el botón `Añadir un servicio`{.action} (icono de cesta de compra). Utilice el filtro situado en la parte superior de la página o desplácese hacia abajo para encontrar el servicio `vRack`{.action}. +>> +>> ![Comprar el vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> Será redirigido a otra página para validar el pedido, la operación solo tardará unos minutos. +>> +>> Una vez que el servicio esté activo, lo encontrará en su área de cliente en la sección `Network`{.action} > `Red privada vRack`{.action}, con la denominación "pn-xxxxxx". +>> +>> Haga clic en su vRack, seleccione el proyecto que desea añadir en la lista de servicios compatibles y haga clic en el botón `Añadir`{.action}. +>> +>> ![añadir el proyecto](images/addprojectvrack.png){.thumbnail} +>> +>> Para continuar la configuración del vRack desde el área de cliente de OVHcloud, siga leyendo este guía desde el [paso 2: Crear una red privada en el vRack](#create-pn-in-vrack), pestaña **Desde el área de cliente de OVHcloud**. +>> +> Desde las APIv6 de OVHcloud +>> +>> **Paso 1: Activar y gestionar un vRack** +>> +>> Conéctese a las APIv6 de OVHcloud siguiendo el guía "[Primeros pasos con las API de OVHcloud](/pages/manage_and_operate/api/first-steps)". +>> +>> Una vez autenticado, siga los pasos descritos a continuación: +>> +>> **Creación del carrito** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada creará un identificador para su "carrito". Puede añadir tantos artículos como desee antes de validar. +>> > +>> > En este caso, el pedido de un vRack es gratuito. Recupere el número de su carrito (cartId), será indispensable para continuar. +>> > +>> +>> **Recuperación de las informaciones necesarias para el pedido del vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada le permitirá recuperar todas las informaciones necesarias para el pedido del vRack. Copie los siguientes elementos: +>> > +>> > *cartId*, *duration*, *planCode*, y *pricingMode*. +>> > +>> +>> **Añadido del vRack al carrito** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada le permitirá añadir el vRack al carrito añadiendo todas las informaciones necesarias para el pedido. +>> > +>> > En el caso del vRack, esto daría por ejemplo: +>> > +>> > cartId: [identificador de su carrito] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Una vez que haya validado el pedido, obtendrá un número de artículo ("itemId"). Consérvelo, le será útil si desea realizar modificaciones antes de validar el carrito. +>> +>> **Validación del carrito** +>> +>> Una vez que todos los artículos estén en su carrito, deberá validar: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada validará el carrito y le creará un bon de commande (orderId). Consérvelo, será necesario para la validación del pedido. +>> > +>> +>> **Validación del pedido final** +>> +>> Para validar el pedido, tiene dos métodos posibles: +>> +>> - Pasar por la URL visible cuando el carrito se valida. +>> Ejemplo de URL: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validar mediante la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Aunque se trata de un bon de commande de 0 €, es necesario simular un pago del bon de commande (orderId). Su bon de commande será entonces validado y su tratamiento comenzará. +>> > +>> +>> Una vez que el bon de commande gratuito se haya validado, puede ser necesario un plazo de unos minutos para que el vRack esté activo. +>> +>> **Paso 2: Añadir su proyecto Public Cloud al vRack** +>> +>> Una vez que el vRack esté activo, deberá integrar su o sus proyectos Public Cloud en el vRack. +>> +>> Conéctese a las APIv6 de OVHcloud siguiendo el guía "[Primeros pasos con las API de OVHcloud](/pages/manage_and_operate/api/first-steps)". +>> +>> En el caso de que el identificador del proyecto Public Cloud no sea conocido, las llamadas siguientes le permitirán recuperarlo. +>> +>> **Identificación del proyecto** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite recuperar la lista de proyectos. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite identificar el proyecto gracias al campo "description". +>> > +>> +>> **Añadido del proyecto al vRack** +>> +>> Una vez conocido el identificador del proyecto y el nombre del vRack, su asociación se hace mediante la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Rellene los campos de la llamada con las informaciones recogidas anteriormente: +>> +>> - **serviceName**: nombre del vRack en la forma "pn-xxxxxx". +>> - **project**: identificador del proyecto Public Cloud, en forma de cadena de 32 caracteres. +>> +>> > [!primary] +>> > +>> > Esta llamada inicializa la asociación del proyecto al vRack, hay que recuperar entonces el identificador de la tarea para verificar su avance. +>> > +>> +>> **Verificación del avance de la tarea de añadido** +>> +>> Puede consultar la evolución del añadido del proyecto en el vRack gracias a esta llamada: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada es opcional y permite simplemente verificar el estado de la tarea. Una vez que esta esté terminada, puede pasar al paso siguiente. +>> > +>> + +### Paso 2: Crear una red privada en el vRack + +Es necesario crear una red privada con una red local virtual (VLAN) para que las instancias conectadas al vRack puedan comunicarse entre sí. + +En la oferta Public Cloud, puede crear hasta 4 000 VLAN en un solo vRack. Esto significa que puede utilizar cada dirección IP privada hasta 4 000 veces. Así, por ejemplo, la IP 192.168.0.10 de la VLAN 2 es diferente de la IP 192.168.0.10 de la VLAN 42. -Esto puede ser útil para segmentar el vRack entre varias redes virtuales. +Esto puede serle útil para segmentar su vRack entre varios redes virtuales. -Desde el área de cliente de OVHcloud, puede asignar la VLAN que desee y personalizar el rango de IP privadas. +Desde el área de cliente de OVHcloud y las APIv6 de OVHcloud, podrá personalizar todos los parámetros: modo y región de implementación, nombre e ID de la VLAN, rango de direcciones IP privadas (por ejemplo, 10.0.0.0/16), DHCP y puerta de enlace. > [!primary] -> En los servidores dedicados, por defecto está en la VLAN 0. Para que la infraestructura OpenStack funcione, deberá indicar el número de su VLAN directamente a nivel de la infraestructura. -> -> A diferencia de los servidores dedicados, no es necesario « etiquetar » la VLAN directamente en una instancia de Public Cloud. -> -> Para más información sobre la gestión de las VLAN del vRack de los servidores dedicados, consulte la siguiente guía: [Crear varias VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -> [!warning] -> El vRack es una infraestructura gestionada a nivel de OVHcloud, por lo que solo podrá administrarla desde el área de cliente de OVHcloud y las APIv6 de OVHcloud. +> En los Servidores dedicados, por defecto, está en la VLAN 0. El funcionamiento de la infraestructura OpenStack hace que deba especificar directamente el número de su VLAN a nivel de infraestructura. > -> OpenStack no está situada al mismo nivel de la infraestructura, por lo que no podrá personalizar las VLAN a través de Horizon o de las API OpenStack. +> A diferencia de los Servidores dedicados, no es necesario "etiquetar" directamente la VLAN en una instancia Public Cloud. > - -#### Crear una red privada desde el área de cliente de OVHcloud - -Una vez creado el vRack, el siguiente paso es crear una red privada. - -En la pestaña Public Cloud , haga clic en `Private Network`{.action} en el menú de la izquierda, en **Network**. - -![Creación de la VLAN](images/vrack2022-03.png){.thumbnail} - -A continuación, haga clic en `Crear una red privada`{.action}. La página siguiente le permitirá personalizar varios parámetros. - -En el paso 1, seleccione la región en la que quiere crear la red privada. - -![select region](images/vrack5-2024.png){.thumbnail} - -En la siguiente etapa podrá elegir entre una serie de opciones: - -![create network](images/vrack6-2022.png){.thumbnail} - -En el campo **Nombre de la red privada**, defina un nombre para la red privada. - -**Cree un servicio Gateway y conéctese a la red privada** - -Seleccione esta opción si quiere crear instancias únicamente con una red privada. Para más información, consulte las siguientes guías: [Creating a private network with Gateway (EN)](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) y [Crear y conectarse a una instancia de Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps). +> Para más información sobre la gestión de las VLAN del vRack de los Servidores dedicados, consulte este guía: [Crear múltiples VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). > [!warning] -> Si la opción aparece atenuada, significa que es incompatible con la región seleccionada. Para más información, consulte nuestra página sobre la [disponibilidad de productos de Public Cloud para cada región](/links/public-cloud/regions-pci). +> El vRack es una infraestructura gestionada a nivel de OVHcloud, por lo que solo podrá administrarlo a través del área de cliente de OVHcloud y de las APIv6 de OVHcloud. > - -**Opciones de red de la capa 2 (L2)** - -Si marca la casilla `Indicar un ID de VLAN`, deberá elegir un número de VLAN de 0 a 4000. - -Si no activa esta casilla, el sistema asignará un número de VLAN aleatoria. - -Si desea que los servidores dedicados de OVHcloud se comuniquen con una VLAN « etiquetada », consulte la siguiente guía: [Crear varias VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**Opciones de distribución de direcciones DHCP** - -El intervalo DHCP predeterminado es 10.0.0.0/16. Puede utilizar otro rango privado de su elección. - -Una vez hecha su elección, haga clic en `Crear`{.action} para iniciar el proceso. - -> [!primary] -> La creación de la red privada puede tardar varios minutos. +> OpenStack no está situado al mismo nivel de la infraestructura, por lo que no podrá personalizar las VLAN a través de la interfaz Horizon o de las API OpenStack. > -#### Crear una red privada desde las APIv6 de OVHcloud - -Para crear una red privada desde las APIv6 de OVHcloud, haga clic [aquí](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) (EN), para consultar la guía específica. - -#### Crear una red privada a través de Terraform - -En Terraform, necesitas usar el proveedor openstack. Puedes descargar un script terraform de ejemplo completo desde [este repositorio](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -La parte específica de OVHcloud para la integración con vRack es el parámetro `value_specs`. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` - -### Etapa 3: Integrar una instancia en el vRack - -Puede darse dos situaciones: +> [!tabs] +> Desde el área de cliente de OVHcloud +>> Una vez que su vRack esté creado, el siguiente paso consiste en crear una red privada. +>> +>> En la pestaña `Public cloud`{.action}, haga clic en `Private Network`{.action} en el menú de la izquierda bajo **Network**. +>> +>> ![Creación de VLAN](images/vrack2022-03.png){.thumbnail} +>> +>> Haga clic ahora en `Crear una red privada`{.action}. La página siguiente le permitirá personalizar varios parámetros. +>> +>> Para empezar, seleccione un modo de despliegue así como la región en la que desea crear la red privada. +>> +>> ![seleccionar región](images/vrack5-2024.png){.thumbnail} +>> +>> En la siguiente etapa, se le presentan varias opciones: +>> +>> ![crear red](images/vrack6-2022.png){.thumbnail} +>> +>> En el campo **Nombre de la red privada**, defina un nombre para su red privada. +>> +>> **Opción de red de la capa 2** +>> +>> Si marca la casilla `Establecer un ID de VLAN`{.action}, deberá elegir un número de VLAN comprendido entre 0 y 4000. +>> +>> Si no marca esta casilla, el sistema asignará un número de VLAN aleatorio. +>> +>> En el caso en que deba hacer comunicar Servidores dedicados OVHcloud con VLAN etiquetados, consulte el siguiente guía: [Crear varios VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **Opciones de distribución de direcciones DHCP** +>> +>> El rango DHCP por defecto es 10.1.0.0/16. Puede utilizar otro rango privado a su elección o desactivar el DHCP para esta red privada. +>> +>> **Opciones de puerta de enlace de red** +>> +>> - **Anunciar la primera dirección de un CIDR determinado como puerta de enlace predeterminada (opción DHCP 3)**: Cuando esta opción está activada, el servidor DHCP anuncia la primera dirección del CIDR como puerta de enlace predeterminada a las máquinas conectadas a la red. +>> - **Asignar un servicio Gateway y conectarse a la red privada**: Seleccione esta opción si tiene la intención de crear instancias con una red privada únicamente. Para más información, le invitamos a consultar las siguientes guías: [Crear una red privada con una Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) y [Crear una primera instancia Public Cloud y conectarse a ella](/pages/public_cloud/Compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > Si la segunda opción está gris, significa que es incompatible con la región seleccionada. Para más información, consulte nuestra página sobre la [disponibilidad de los productos Public Cloud para cada región](/links/public-cloud/regions-pci). +>> > +>> +>> Una vez que haya tomado sus decisiones, haga clic en `Configure su red privada`{.action} para iniciar el proceso. +>> +>> > [!primary] +>> > +>> > La creación de la red privada puede tardar varios minutos. +>> > +>> +> Desde las APIv6 de OVHcloud +>> +>> Una vez conectado a la [APIv6 de OVHcloud](/links/api), ejecute los siguientes comandos en orden. +>> +>> **Paso 1 - Recuperación de las informaciones necesarias:** +>> +>> **Proyecto Public Cloud** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite recuperar la lista de proyectos. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite identificar el proyecto gracias al campo "description". +>> > +>> +>> **vRack concernido** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > En el campo serviceName, indique el identificador de su proyecto. Conserve la información relativa al identificador del vRack bajo la forma "pn-xxxxx". +>> > +>> +>> **Paso 2 - Creación de la red privada:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Rellene los campos con las informaciones obtenidas anteriormente: +>> > +>> > - **serviceName**: ID del proyecto. +>> > - **name**: el nombre que quiere dar al VLAN. +>> > +>> > Puede dejar el campo "Region" vacío para que se active para todas las regiones. +>> > +>> > El identificador del VLAN (vlanId) es necesario si desea crear un VLAN específico. +>> > +>> +>> La creación tarda unos instantes. +>> +>> Para verificar las informaciones de sus VLAN, puede utilizar la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite recuperar el networkId. Este se presentará bajo la forma siguiente: nom-vrack_vlanId. +>> > +>> > Por ejemplo, para el VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Paso 3 - Creación del subred:** +>> +>> Por defecto, si no añade un subred, el rango de IP utilizado es el siguiente: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> Si desea gestionar usted mismo las asignaciones de IP, deberá crear un subred. +>> +>> Para ello, una vez que el VLAN esté creado, deberá crear el subred para cada zona afectada mediante la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Puede rellenar los campos como sigue: +>> +>> |Campo|Descripción| +>> |---|---| +>> |serviceName|Identificador de su proyecto.| +>> |networkId|Identificador de su red obtenido durante los comandos anteriores. Por ejemplo: pn-xxxxxx_42 para el VLAN 42.| +>> |dhcp|Casilla marcada para activación / desmarcada para desactivación del DHCP en el VLAN.| +>> |end|Última dirección del subred de la región. Por ejemplo: 192.168.1.50.| +>> |network|Bloque IP del subred. Por ejemplo: 192.168.1.0/24.| +>> |region|Ejemplo: SBG3.| +>> |start|Primera dirección del subred para esta región Por ejemplo: 192.168.1.15.| +>> +>> > [!primary] +>> > +>> > Esta es la etapa de creación del subred por región. Puede activar o no la asignación de direcciones IP privadas de forma dinámica mediante DHCP. +>> > +>> > Deberá realizar la misma operación para cada zona en la que estén sus instancias. +>> > +>> +>> > [!warning] +>> > +>> > Asegúrese de separar bien sus pools de direcciones IP para las diferentes regiones. Por ejemplo: +>> > +>> > - De 192.168.0.2 a 192.168.0.254 para SBG1. +>> > - De 192.168.1.2 a 192.168.1.254 para GRA1. +>> > +>> +> Desde Terraform +>> +>> En Terraform, hay que utilizar el provider OpenStack. Puede descargar un ejemplo de script terraform completo en [este depósito GitHub](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> La parte específica de OVHcloud para la integración vRack es el parámetro `value_specs`. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Desde la CLI OpenStack +>> En el ejemplo siguiente, especificamos el `VLAN_ID` al que queremos que la red pertenezca mediante `--provider-network-type` y `--provider-segment`. +>> +>> Puede eliminar estos parámetros. En este caso, se utilizará un `VLAN_ID` disponible. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> + +### Paso 3: Integrar una instancia en el vRack + +Dos situaciones pueden presentarsele: - La instancia aún no existe. - La instancia ya existe y debe añadirla al vRack. -**Caso de una nueva instancia** - -#### Desde el área de cliente de OVHcloud - -Consulte la guía [Crear una instancia desde el área de cliente](/pages/public_cloud/compute/public-cloud-first-steps). Al crear una instancia, podrá especificar, en el paso 5, un modo de red y, a continuación, una red privada en la que integrar su instancia. - -![attach new instance](images/network-selection.png){.thumbnail} +/// details | **Caso de una nueva instancia** + +> [!tabs] +> Desde el área de cliente de OVHcloud +>> Consulte la guía "[Cómo crear una instancia de Public Cloud y conectarse a ella](/pages/public_cloud/Compute/public-cloud-first-steps)". Durante la creación de una instancia, puede elegir en el paso 5, un modo de red y luego una red privada en la que integrar su instancia. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > Al crear una nueva instancia, solo podrá conectar su instancia a **un único** vRack desde el área de cliente de OVHcloud. +>> > +>> > Para añadir varias interfaces diferentes, deberá utilizar las API OpenStack o Horizon. +>> > +>> +> Desde las APIv6 de OVHcloud +>> Una vez conectado a la [APIv6 de OVHcloud](/links/api), ejecute los siguientes comandos en orden. +>> +>> **Paso 1 - Recuperación de la información necesaria** +>> +>> **Recuperación del identificador del proyecto:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Recuperación del networkID de la red pública (EXT-NET)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Recuperación del networkID de la red privada (interfaz vRack creada anteriormente)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > El identificador obtenido tiene la forma: "pn-xxxxx_yy" donde yy es el número del VLAN. +>> > +>> +>> **Recuperación del identificador del tipo de instancia elegido (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > Puede limitar la lista indicando la zona de creación de su instancia. +>> > +>> +>> **Recuperación del identificador de la imagen elegida (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > Puede limitar la lista indicando la zona de creación de su instancia. +>> > +>> +>> **Recuperación del identificador de su clave SSH OpenStack (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> Si aún no ha añadido una clave SSH a su área de cliente, puede hacerlo a través de la siguiente función API: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> **Paso 2 - Despliegue de la instancia** +>> +>> Una vez reunidos todos los elementos necesarios para el despliegue, puede utilizar la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> Deberá rellenar al menos los siguientes campos: +>> +>> |Campo|Descripción| +>> |---|---| +>> |serviceName|Identificador del proyecto Public Cloud concernido.| +>> |flavorId|Identificador del tipo de instancia (por ejemplo: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|Identificador de la imagen de despliegue (por ejemplo: Debian 9, Centos 7, etc.).| +>> |name|Nombre que le da a su instancia.| +>> |networks|En la parte "networkId", indique el identificador de la red pública (ext-net) o el de su VLAN (pn-xxxxxx_yy). Puede hacer clic en el botón "+" para añadir otras redes.| +>> |region|Regiones de despliegue de la instancia (por ejemplo: GRA5).| +>> |sshKeyId|Identificador de su clave SSH OpenStack.| +>> +>> Una vez realizada la llamada, si todas las informaciones están correctamente rellenadas, la instancia se creará con una o varias interfaces de red. +>> +>> > [!warning] +>> > +>> > Según los sistemas operativos, deberá configurar manualmente sus interfaces de red privadas para que se tome en cuenta.
+>> > OpenStack no siendo capaz de priorizar la interfaz pública de la interfaz vRack, puede ocurrir que esta última pase a ser la ruta por defecto.
+>> > La consecuencia directa es que la instancia no sea accesible desde una IP pública.
+>> > Un o varios reinicios de la instancia desde el espacio cliente pueden permitir restablecer la situación.
+>> > Otra solución consiste en conectarse a la instancia en SSH a través de otro de sus servidores presentes en la misma red privada. También puede corregir la configuración de red de la instancia a través del modo Rescue. +>> > +>> +> Desde la CLI OpenStack +>> **Recuperación de la información necesaria** +>> +>> Identificación de las redes públicas y privadas: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MiVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MiVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MiVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MiVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Deberá anotar los ID de las redes que le interesan: +>> > +>> > - Ext-Net para tener una IP pública. +>> > - El del o de los VLAN necesarios para su configuración. +>> > +>> +>> También deberá anotar las siguientes informaciones, como se indica en el [guía de uso de la API Nova](/pages/public_cloud/Compute/starting_with_nova): +>> +>> - ID o nombre de la clave SSH OpenStack. +>> - ID del tipo de instancia (flavor). +>> - ID de la imagen deseada (Sistema operativo, snapshot, etc.). +>> +>> **Despliegue de la instancia** +>> +>> Con los elementos recuperados anteriormente, es posible crear una instancia incluyéndola directamente en el vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Por ejemplo: +>> +>> ```bash +>> nova boot --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nombre de la clave] | +>> | metadata | {} | +>> | name | [Nombre de su instancia] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Por ejemplo: +>> +>> ```bash +>> openstack server create --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nombre de la clave] | +>> | metadata | {} | +>> | name | [Nombre de su instancia] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> Usted tiene la posibilidad de definir la dirección IP de la interfaz vRack de su instancia a nivel de OpenStack. +>> +>> Para ello, puede añadir un argumento sencillo en la función "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Por ejemplo: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verificación de la instancia** +>> +>> Después de unos minutos, puede verificar la lista de las instancias existentes para encontrar el servidor creado: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+--------------------------+--------+--------------------------------------------------+--------------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------------------+--------+--------------------------------------------------+--------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Nombre de la instancia] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | [Nombre de la instancia] | +>> +--------------------------------------+--------------------------+--------+--------------------------------------------------+--------------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Nombre de la instancia] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **Caso de una instancia ya existente** + +El área de cliente de OVHcloud permite adjuntar una instancia a una o varias redes privadas, pero no ofrece una configuración avanzada de las interfaces de red. Si desea personalizar más estas interfaces, deberá gestionarlas desde las APIv6 de OVHcloud, desde las API de OpenStack o desde Horizon. + +La acción consistirá simplemente en añadir una nueva interfaz de red a su servidor, además de la existente. + +Por ejemplo, si tiene una interfaz pública *eth0*, tendrá además una interfaz *eth1*. > [!warning] -> Al crear una nueva instancia, solo podrá conectar su instancia a un único vRack desde el área de cliente de OVHcloud. -> Para añadir varias interfaces diferentes, debe utilizar las API de OpenStack u Horizon. +> La configuración de esta nueva interfaz rara vez es automática. Por lo tanto, deberá configurarla en DHCP o con una IP fija según su infraestructura. > -#### Desde la APIv6 de OVHcloud - -Haga clic [aquí](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) (EN), para consultar la guía específica sobre este método. - -**Caso de una instancia ya existente** - -El área de cliente de OVHcloud permite asociar una instancia a una o más redes privadas, pero no ofrece una configuración avanzada de las interfaces de red. Si quiere personalizarlas más, deberá administrarlas, o bien a través de las API de OVHcloud, o bien a través de las API de OpenStack, o bien a través de Horizon. - -Añada una nueva interfaz de red al servidor, además de la que ya existe. - -Por ejemplo, si tiene una interfaz pública *eth0*, agregará la interfaz *eth1*. +> [!tabs] +> Desde el área de cliente de OVHcloud +>> Inicie sesión en su [área de cliente de OVHcloud](/links/manager), vaya a la sección `Public Cloud`{.action} y seleccione el proyecto Public Cloud correspondiente en la esquina superior izquierda. +>> +>> Haga clic en `Instancias`{.action} en el menú lateral izquierdo. A continuación, haga clic en el botón `⁝`{.action} a la derecha de la instancia correspondiente y luego en `Detalles de la instancia`{.action}. +>> +>> ![detalles de la instancia](images/instance_details.png){.thumbnail} +>> +>> Se le mostrará el panel de control de su instancia. Haga clic en el botón `⁝`{.action} a la derecha de "Redes privadas" y luego en `Asociar una red`{.action}. +>> +>> ![adjuntar red](images/vrack2021-01.png){.thumbnail} +>> +>> En la ventana emergente que aparece, seleccione la o las redes privadas que desee adjuntar a su instancia y haga clic en `Confirmar`{.action}. +>> +>> ![adjuntar red](images/vrack9.png){.thumbnail} +>> +> Desde las APIv6 de OVHcloud +>> La acción consistirá simplemente en añadir una nueva interfaz de red a su servidor, además de la existente. +>> +>> Por ejemplo, si el servidor dispone de una interfaz pública eth0, se añadirá una interfaz adicional eth1. +>> +>> > [!primary] +>> > +>> > La configuración de esta nueva interfaz rara vez es automática.
+>> > Deberá por tanto configurarla en DHCP o con una IP fija según su infraestructura. +>> > +>> +>> **Los pasos siguientes describen cómo gestionar las interfaces de red de sus instancias.** +>> +>> **Paso 1 - Recuperación de la información necesaria** +>> +>> **Recuperación del identificador del proyecto:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Recuperación del identificador de la instancia:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Recuperación del networkID de la red pública (EXT-NET):** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Recuperación del networkID de la red privada (interfaz vRack creada anteriormente):** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > El identificador obtenido tiene la forma: "pn-xxxxx_yy" donde yy es el número del VLAN. +>> > +>> +>> **Paso 2 - Añadido de una interfaz a su instancia** +>> +>> Una vez recuperada toda la información necesaria, puede utilizar el siguiente llamado: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> Deberá rellenar al menos los siguientes campos: +>> +>> |Campo|Descripción| +>> |---|---| +>> |serviceName|Identificador del proyecto Public Cloud correspondiente.| +>> |instanceId|Identificador de la instancia correspondiente.| +>> |networkId|Indique el identificador de la red pública (ext-net) o el de su VLAN (pn-xxxxxx_yy).| +>> |ip|Definir una IP específica (funciona únicamente para interfaces privadas).| +>> +>> Una vez realizado el llamado, si todas las informaciones están correctamente rellenadas, una nueva interfaz se añadirá a su instancia. +>> +>> > [!primary] +>> > +>> > Su instancia OVHcloud dispondrá por tanto de una nueva interfaz de red además de la interfaz pública (Ext-net).
+>> > Podrá ver, en el resumen de la instancia, la dirección IP privada asignada automáticamente a su interfaz.
+>> > Será su responsabilidad utilizarla configurando su interfaz mediante DHCP o utilizando sus propias IP mediante una configuración en IP estática. +>> > +>> +>> **Paso 3 - Desenganchar una interfaz de su instancia** +>> +>> > [!warning] +>> > +>> > Desenganchar una interfaz de red la eliminará inmediatamente. +>> > +>> > Sin embargo, es importante señalar que si desengancha la interfaz "Ext-Net" (IP pública), esta dirección se liberaría y se pondría en circulación. No podría por tanto reclamarla.
+>> > Esta acción solo debe realizarse si desea aislar su servidor en el vRack (red privada) o, por el contrario, retirarlo de uno o varios VLAN. +>> > +>> +>> Una vez recuperada toda la información necesaria, puede utilizar el siguiente llamado para eliminar una interfaz: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> Deberá rellenar al menos los siguientes campos: +>> +>> |Campo|Descripción| +>> |---|---| +>> |serviceName|Identificador del proyecto Public Cloud correspondiente.| +>> |instanceId|Identificador de la instancia correspondiente.| +>> |networkId|Indique el identificador de la red pública (ext-net) o el de su VLAN (pn-xxxxxx_yy).| +>> +> Desde OpenStack Horizon +>> Inicie sesión en la interfaz [Horizon](https://horizon.cloud.ovh.net/auth/login/) siguiendo el método indicado en la [primera parte de este guía](#horizon). +>> +>> Inicie sesión en su zona de trabajo: +>> +>> ![conexión Horizon](images/horizon1.png){.thumbnail} +>> +>> Vaya a `Compute`, y luego a `Instances`: +>> +>> ![Horizon Compute instances](images/horizon2.png){.thumbnail} +>> +>> **Añadido de una interfaz de red privada** +>> +>> Para añadir una interfaz, en la columna `Actions`, haga clic en la flecha que permite acceder a las acciones posibles sobre la instancia. Haga clic a continuación en `Attach Interface`{.action}: +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Seleccione su interfaz y valide: +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Su instancia OVHcloud dispondrá por tanto de una nueva interfaz de red además de la interfaz pública (Ext-net).
+>> > Podrá ver, en el resumen de la instancia, la dirección IP privada asignada automáticamente a su interfaz.
+>> > Será su responsabilidad utilizarla configurando su interfaz mediante DHCP o utilizando sus propias IP mediante una configuración en IP estática. +>> > +>> +>> **Desenganchar una interfaz de red** +>> +>> > [!warning] +>> > +>> > Desenganchar una interfaz de red la eliminará inmediatamente. +>> > +>> > Sin embargo, es importante señalar que si desengancha la interfaz "Ext-Net" (IP pública), esta dirección se liberaría y se pondría en circulación. No podría por tanto reclamarla.
+>> > Esta acción solo debe realizarse si desea aislar su servidor en el vRack (red privada) o, por el contrario, retirarlo de uno o varios VLAN. +>> > +>> +>> Para desenganchar una interfaz de red privada, en la columna `Actions`, haga clic en la flecha que permite acceder a las acciones posibles sobre la instancia. Haga clic a continuación en `Detach Interface`{.action}: +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Seleccione la interfaz a eliminar y valide: +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Desde la CLI OpenStack +>> **Recuperación de la información necesaria** +>> +>> Identificación de sus instancias: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Mi-instancia | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MonVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Mi-instancia | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MonVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Identificación de las redes públicas y privadas: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MiVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MiVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MiVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MiVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Deberá anotar los ID de las redes que le interesen: +>> > +>> > - Ext-Net para tener una IP pública. +>> > - El de los VLAN necesarios para su configuración. +>> > +>> +>> **Añadido de una interfaz de red privada** +>> +>> Para adjuntar una nueva interfaz, puede realizar el siguiente comando: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Por ejemplo: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> Puede verificar que la acción ha sido correctamente realizada: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => su IP pública +>> | MiVLAN-42 network | 192.168.0.x | => su IP privada +>> [...] +>> ``` +>> +>> o +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MiVLAN-42=192.168.0.x | => su IP pública ; su IP privada +>> [...] +>> ``` +>> + +### Desenganchar una interfaz de red > [!warning] -> La configuración de esta nueva interfaz rara vez es automática. -> Deberá configurarla en DHCP o IP fija según su infraestructura. +> Desenganchar una interfaz de red la eliminará inmediatamente. +> +> Sin embargo, es importante señalar que si desengancha la interfaz "Ext-Net" (IP pública), esta dirección se liberaría y se pondría en circulación. No podría por tanto reclamarla.
+> Esta acción solo debe realizarse si desea aislar su servidor en el vRack (red privada) o, por el contrario, retirarlo de uno o varios VLAN. > -#### Desde el área de cliente de OVHcloud - -Conéctese al [área de cliente de OVHcloud](/links/manager), acceda a la sección `Public Cloud`{.action} y seleccione el proyecto de Public Cloud correspondiente en la parte superior izquierda. - -En la columna izquierda, haga clic en `Instancias`{.action}. Haga clic en el botón `...`{.action} a la derecha de la instancia correspondiente y, seguidamente, en `Detalles de la instancia`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -Se mostrará el panel de control de la instancia. Haga clic en el botón `...`{.action} a la derecha de "Red(es) privada(s)" y, seguidamente, en `Asociar una red`{.action}. - -![conexión de red](images/vrack2021-01.png){.thumbnail} - -En la nueva ventana, seleccione la red o redes privadas que quiera asociar a la instancia y haga clic en `Asociar`{.action}. - -![conexión de red](images/vrack9.png){.thumbnail} - -#### Gestión de las interfaces de red desde las APIv6 de OVHcloud - -Haga clic [aquí](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) (EN), para consultar la guía específica sobre este método. - -#### Gestión de las interfaces de red desde OpenStack Horizon - -Conéctese a la interfaz [Horizon](https://horizon.cloud.ovh.net/auth/login/) utilizando el método que se indica en la [primera parte de esta guía](./#interfaz-horizon). - -Conéctese a su zona de trabajo: - -![connexion Horizon](images/horizon1.png){.thumbnail} - -Acceda a `Compute` y seleccione `Instances`. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Añadir una interfaz privada** - -Para añadir una interfaz, haga clic en la flecha que le permitirá acceder a las acciones que pueda realizar en la instancia, en la columna "Actions". Haga clic en `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Seleccione la interfaz y acepte: - -![Horizon attach interface](images/horizon4.png){.thumbnail} +Para desenganchar una interfaz de red, necesitará en primer lugar identificar el puerto Neutron que se haya creado. -> [!primary] -> El servicio de OVHcloud dispondrá de una nueva interfaz de red, además de la interfaz pública (Ext-net). ->
En el resumen de la instancia, podrá ver la dirección IP privada asignada automáticamente a su interfaz. ->
que deberá utilizar configurando la interfaz a través del DHCP o utilizando sus propias IP mediante una configuración de IP estática. -> +Para ello, puede utilizar los siguientes comandos: -**Desvincular una interfaz de red** +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` -> [!warning] -> Desvincular una interfaz de red hace que se elimine inmediatamente. -> -> Sin embargo, es importante tener en cuenta que si desvincula la interfaz «Ext-Net» (IP pública), esta dirección se liberará y volverá a poner en circulación. Así que no podrías reasignarla. ->
Esta acción solo debe realizarse si desea aislar su servidor en el vRack (red privada) o en caso contrario, sacarlo de una o varias VLAN. -> +o + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -Para desvincular una interfaz red privata, haga clic en la flecha que le permitirá acceder a las acciones que pueda realizar en la instancia, en la columna "Actions". Haga clic en `Detach Interface`{.action}. +Una vez identificado el puerto que desea eliminar, puede ejecutar el siguiente comando: -![Horizon detach interface](images/horizon5.png){.thumbnail} +```bash +nova interface-detach +``` -Seleccione la interfaz que desea eliminar y acepte: +Por ejemplo: -![Horizon detach interface](images/horizon6.png){.thumbnail} +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` +/// ## Más información -[Configuración del vRack Public Cloud desde las APIv6 de OVHcloud](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) (EN) - -[Servidores dedicados - Crear varias VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +[Servidores dedicados - Crear varios VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) -Si necesita formación o asistencia técnica para implantar nuestras soluciones, póngase en contacto con su representante de ventas o haga clic en [este enlace](/links/professional-services) para obtener un presupuesto y solicitar un análisis personalizado de su proyecto a nuestros expertos del equipo de Servicios Profesionales. +Si necesita formación o asistencia técnica para la implementación de nuestras soluciones, póngase en contacto con su comercial o haga clic en [este enlace](/links/professional-services) para obtener un presupuesto y solicitar un análisis personalizado de su proyecto a nuestros expertos del equipo de Professional Services. Interactúe con nuestra [comunidad de usuarios](/links/community). \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.es-us.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.es-us.md index 83fcd5a48ce..01bc8561977 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.es-us.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.es-us.md @@ -1,339 +1,1194 @@ --- title: 'Configuración del vRack Public Cloud' excerpt: 'Cómo configurar el vRack para sus instancias Public Cloud' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objetivo -El [vRack](/links/network/vrack) OVHcloud es una solución de red privada que permite configurar el direccionamiento entre varios servidores dedicados de OVHcloud. Al mismo tiempo, le permite agregar [instancias de Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps) a su red privada para crear una infraestructura de recursos físicos y virtuales. +El [vRack](/links/network/vrack) es una red privada que le permite configurar la dirección entre varios Servidores dedicados de OVHcloud. Pero también le permite añadir [instancias Public Cloud](/links/public-cloud/Compute) a su red privada para crear una infraestructura de recursos físicos y virtuales. -**Esta guía le ayudará a configurar sus instancias de Public Cloud en el vRack.** +**Este guía tiene como objetivo acompañarle en la configuración de sus instancias Public Cloud dentro de su vRack.** ## Requisitos -- Tener un [proyecto de Public Cloud.](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) -- Haber iniciado sesión en el [área de cliente de OVHcloud](/links/manager). -- Haber [creado un usuario de OpenStack](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user) (opcional). -- Conocimientos básicos de redes. +- Tener un [proyecto Public Cloud](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) +- Estar conectado a su [área de cliente de OVHcloud](/links/manager) +- Tener [creado un usuario OpenStack](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user) (opcional) +- Conocimientos básicos de redes ## Presentación de las interfaces -La creación de un vRack o la adición de una instancia a la red se pueden realizar mediante el área de cliente de OVHcloud, las APIv6 de OVHcloud, las API de OpenStack, la interfaz Horizon o Terraform. +Ya sea para crear su vRack o para añadir una instancia en esta red, puede que tenga que utilizar el área de cliente de OVHcloud, las APIv6 de OVHcloud, las API OpenStack, la interfaz Horizon o Terraform. + +Según su perfil técnico y sus necesidades, puede que tenga que elegir qué interfaz o método utilizar. Así, para cada acción, le propondremos las diferentes opciones posibles. + +**A continuación, se muestra un breve descriptivo de las acciones posibles según el método o interfaz elegido:** -Según su perfil técnico y sus necesidades, deberá elegir qué interfaz o método utilizar. Así pues, para cada acción, le proponemos los distintos pasos posibles. +/// details | área de cliente de OVHcloud -**Para empezar, a continuación se proporciona una breve descripción de las posibles acciones según el método/interfaz elegido.** +[El área de cliente de OVHcloud](/links/manager) es una interfaz completamente y exclusivamente visual, lo que la convierte en una interfaz ideal para la gestión de varios VLAN. También tendrá la posibilidad de personalizar el rango de IP privada, que por defecto es 10.1.0.0/16. -### Área de cliente de OVHcloud +Los VLAN se desplegarán en la región seleccionada. También tendrá la posibilidad de activar o no las pasarelas, activar las distribuciones DHCP, etc. -El [área de cliente de OVHcloud](/links/manager) es una interfaz completa y únicamente visual, lo que la convierte en una interfaz ideal para la gestión de varias VLAN. También podrá personalizar el rango de IP privadas, que por defecto es 10.x.x.x/16. +También podrá gestionar la facturación de sus servicios a través de su área de cliente de OVHcloud. -Las VLAN se desplegarán en la Región seleccionada. También podrá activar las puertas de enlace, las distribuciones DHCP, etc. +/// -También podrá gestionar la facturación de sus servicios desde el área de cliente de OVHcloud. + -### Interfaz Horizon +/// details | Interfaz Horizon -Interfaz visual independiente de OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) es la implementación original del panel de control de OpenStack, que proporciona una interfaz de usuario web a los servicios OpenStack, incluyendo Nova, Swift, Keystone, etc. +Interfaz visual independiente de OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) es la implementación original del panel de control de OpenStack, que proporciona una interfaz de usuario web a los servicios OpenStack, entre ellos Nova, Swift, Keystone, etc. -Esta completa interfaz técnica le permite gestionar casi todas las acciones de OpenStack. Será una de las interfaces necesarias si desea gestionar más de dos VLAN, añadir interfaces de red privadas a sus instancias, gestionar imágenes personalizadas, etc. +Esta interfaz completa y técnica le permite gestionar casi todas las acciones de OpenStack. Será una de las interfaces necesarias si desea gestionar más de dos VLAN, añadir interfaces de red privadas a sus instancias, gestionar imágenes personalizadas, etc. -Consulte la guía [Conectarse a Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) para familiarizarse con Horizon. +Consulte el guía "[Presentación de Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon)" para familiarizarse con Horizon. > [!primary] -> Horizon que funciona por zonas. No olvide elegir su zona geográfica de trabajo en la parte superior izquierda de su interfaz (GRA5, SBG3, BHS1, etc.). +> Como Horizon funciona por zonas, recuerde elegir su zona geográfica de trabajo en la parte superior izquierda de su interfaz (GRA5, SBG3, BHS1, etc.) > -### OVHcloud APIv6 +/// -Cada acción que realice en el área de cliente de OVHcloud recurre a las [APIv6 de OVHcloud](/links/api). -Puede incluso ir más lejos en las API que en el área de cliente. +/// details | APIv6 OVHcloud -La interfaz es menos visual que el área de cliente de OVHcloud, pero le permitirá realizar un gran número de acciones. De este modo, podrá gestionar y personalizar sus VLAN, añadir interfaces a sus instancias o crear servidores altamente personalizados. +Cada acción que realice en el área de cliente de OVHcloud llama a las [APIv6 de OVHcloud](/links/api). +Incluso puede ir más allá en las API que en su espacio cliente. -A veces deberá obtener más información antes de utilizar una API específica. +La interfaz es menos visual que el área de cliente de OVHcloud, pero le permitirá realizar un gran número de acciones. Podrá gestionar y personalizar sus VLAN, añadir interfaces a sus instancias o crear servidores altamente personalizados. -Solo tiene que acceder a las API desde [nuestra página web](/links/api), pero también puede crear sus scripts PHP o Python para llamar. +A veces será necesario recuperar varias informaciones antes de utilizar una API específica. + +Puede acceder fácilmente a las API desde [nuestra página web](/links/api), pero también crear sus scripts PHP o Python para llamarlas. De este modo, podrá automatizar libremente las tareas básicas mediante scripts, optimizar sus propias funciones, etc. -Consulte la guía [Primeros pasos con las API de OVHcloud](/pages/manage_and_operate/api/first-steps), para familiarizarse con el uso de las APIv6 de OVHcloud. +Consulte el guía "["Primeros pasos con las API de OVHcloud](/pages/manage_and_operate/api/first-steps)" para familiarizarse con el uso de las APIv6 de OVHcloud. + +/// -### API OpenStack +/// details | API OpenStack -Una vez que haya descargado e instalado las herramientas OpenStack, es posible administrar los servicios de Public Cloud con comandos Linux o Windows. +Es posible administrar los servicios Public Cloud mediante líneas de comandos de Linux o Windows, después de descargar e instalar las herramientas OpenStack. -Este método requiere conocimientos Linux o Windows para aprovecharlo, pero permite disfrutar de toda la potencia de OpenStack a través de este método. +Este método requiere buenos conocimientos de Linux o Windows para aprovecharlo, pero le permite aprovechar toda la potencia de OpenStack mediante este medio. -Según la capa que quiera gestionar, deberá utilizar el cliente **Nova** (Compute), **Neutron** (red), **Glance** (Image) o **Swift** (Object Storage). El último hijo de la familia, el cliente OpenStack, le permite gestionar directamente las capas de OpenStack. +Según la capa que desee gestionar, deberá utilizar el cliente Nova (Compute), Neutron (red), Glance (Imagen) o también Swift (Object Storage). El último nacido de la familia, el cliente OpenStack, le permite gestionar directamente casi todas las capas de OpenStack. -Gracias a la API de OpenStack, también puede automatizar esta gestión a través de sus scripts. +Gracias a la API OpenStack, también puede automatizar fácilmente esta gestión a través de sus scripts. -Para familiarizarse con la API de OpenStack, consulte las siguientes guías: +Para familiarizarse con la API OpenStack, consulte primero los siguientes guías: -- [Preparar el entorno para utilizar la API de OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Preparar el entorno para utilizar la API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) - [Cargar las variables de entorno necesarias para OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) -En ese caso, podrá utilizar las siguientes API dedicadas a OpenStack: +Podrá, según su necesidad, utilizar las API dedicadas a OpenStack: -- Nova (compute) -- Glance (image) -- Cinder (image) -- Neutron (network) +- Nova (Compute) +- Glance (imagen) +- Cinder (imagen) +- Neutron (red) > [!primary] -> En algunos casos será más fácil utilizar las API OpenStack y en otros, las API Nova, Neutron, etc. +> En algunos casos, será más sencillo utilizar las API OpenStack y en otros, las API Nova, Neutron, etc. > -> Asimismo, algunas funcionalidades pueden estar ausentes de la API OpenStack en función de la versión de su cliente y su sistema operativo. -En esta guía, hemos elegido las alternativas más sencillas e intuitivas. -Si desea más información sobre su uso, consulte la [documentación oficial de OpenStack](https://docs.openstack.org/). +> Del mismo modo, ciertas funcionalidades pueden faltar en la API OpenStack según la versión de su cliente y de su sistema operativo. +> En el marco de este guía, se ha optado por proponerle las alternativas más sencillas y intuitivas. +> Puede consultar en cualquier momento la [documentación oficial de OpenStack](https://docs.openstack.org/fr/) si desea profundizar en su uso. > -Para más información, consulte esta guía: [Configuración del vRack Public Cloud con OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | CLI OpenStack -Terraform también permite gestionar las infraestructuras de OVHcloud. +Puede gestionar sus servicios Public Cloud y su vRack de OVHcloud directamente desde su terminal Linux o Windows gracias a la CLI OpenStack. -Para ello, elija el proveedor y el recurso de Terraform adecuados. Para más información, consulte nuestra [guía de uso de Terraform (EN)](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +Esta interfaz permite gestionar todas las capas OpenStack: -## Procedimiento +- Nova: instancias (Compute) +- Neutron: redes +- Glance: imágenes +- Cinder: volúmenes + +La CLI centraliza estas funcionalidades y puede integrarse en sus scripts para automatizar sus tareas. -### Etapa 1: Activar y gestionar un vRack +Antes de comenzar, consulte los siguientes guías: -#### Desde el área de cliente de OVHcloud +- [Preparar el entorno para utilizar la API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Cargar las variables de entorno necesarias para OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> No se aplicará a los proyectos recién creados que se entreguen automáticamente con un vRack. Para ver el vRack una vez creado el proyecto, acceda al menú `Network`{.action} en la pestaña de la izquierda e haga clic en `Red privada vRack`{.action} para ver el vRack(s). +> +> La CLI OpenStack es útil para gestionar su vRack, sin embargo ciertas funciones pueden variar según la versión del cliente o del sistema operativo. Consulte la [documentación oficial de OpenStack](https://docs.openstack.org/fr/). > -Si tiene un proyecto más antiguo y no tiene un vRack, debe contratar uno. Este producto es gratuito y solo tarda unos minutos en estar disponible. - -En el menú situado a la izquierda de la pantalla, haga clic en el botón `Añadir un servicio`{.action} (icono de cesta de la compra). Utilice el filtro en la parte superior de la página o desplácese hacia abajo para encontrar el servicio `vRack`{.action}. - -![Contratar el vRack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} - -Será redirigido a otra página para validar el pedido. La operación tardará unos minutos. - -Una vez activado el servicio, puede consultarlo en el área de cliente, en la sección `Network`{.action} > `Red privada vRack`{.action}. Bajo la denominación «pn-xxxxx». +/// -En la lista de servicios compatibles, seleccione el proyecto que quiera añadir al vRack y haga clic en el botón `Añadir`{.action}. +/// details | Terraform -![agregar proyecto](images/addprojectvrack.png){.thumbnail} +Terraform también permite gestionar las infraestructuras de OVHcloud. -Para continuar la configuración del vRack desde el área de cliente de OVHcloud, continúe leyendo esta guía: [Crear una red privada desde el área de cliente de OVHcloud](./#crear-una-red-privada-desde-el-área-de-cliente-de-ovhcloud). +Para ello, debe elegir el proveedor y el recurso Terraform adecuados. Encuentre más información en nuestro [guía de uso de Terraform](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -#### Desde la APIv6 de OVHcloud +/// -Para activar y gestionar un vRack desde la APIv6 de OVHcloud, haga clic [aquí](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) (EN), para consultar la guía específica sobre este método. +## Procedimiento -### Etapa 2: Crear una red privada en el vRack +### Paso 1: Activar y gestionar un vRack -Es necesario crear una red privada con una red de área local virtual (VLAN) para que las instancias conectadas al vRack puedan comunicarse entre sí. +> [!warning] +> +> El vRack se gestiona a nivel de infraestructura de OVHcloud, lo que significa que solo puede administrarlo desde su área de cliente y las APIv6 de OVHcloud. +> -En la solución Public Cloud, puede crear hasta 4000 VLAN en un único vRack. Esto significa que puede utilizar cada dirección IP privada hasta 4000 veces. +> [!tabs] +> Desde el área de cliente de OVHcloud +>> > [!primary] +>> > +>> > Este paso no se aplica a los proyectos recientemente creados, que ahora se entregan automáticamente con un vRack. Para visualizar el vRack una vez creado el proyecto, vaya a la sección `Network`{.action} y haga clic en `Red privada vRack`{.action} para ver el o los vRacks. +>> > +>> +>> Si tiene un proyecto más antiguo y no dispone de un vRack, deberá pedirlo. Este producto es gratuito y la entrega solo tarda unos minutos. +>> +>> En el menú situado a la izquierda de la pantalla, haga clic en el botón `Añadir un servicio`{.action} (icono de cesta de compra). Utilice el filtro situado en la parte superior de la página o desplácese hacia abajo para encontrar el servicio `vRack`{.action}. +>> +>> ![Comprar el vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> Será redirigido a otra página para validar el pedido, la operación solo tardará unos minutos. +>> +>> Una vez que el servicio esté activo, lo encontrará en su área de cliente en la sección `Network`{.action} > `Red privada vRack`{.action}, con la denominación "pn-xxxxxx". +>> +>> Haga clic en su vRack, seleccione el proyecto que desea añadir en la lista de servicios compatibles y haga clic en el botón `Añadir`{.action}. +>> +>> ![añadir el proyecto](images/addprojectvrack.png){.thumbnail} +>> +>> Para continuar la configuración del vRack desde el área de cliente de OVHcloud, siga leyendo este guía desde el [paso 2: Crear una red privada en el vRack](#create-pn-in-vrack), pestaña **Desde el área de cliente de OVHcloud**. +>> +> Desde las APIv6 de OVHcloud +>> +>> **Paso 1: Activar y gestionar un vRack** +>> +>> Conéctese a las APIv6 de OVHcloud siguiendo el guía "[Primeros pasos con las API de OVHcloud](/pages/manage_and_operate/api/first-steps)". +>> +>> Una vez autenticado, siga los pasos descritos a continuación: +>> +>> **Creación del carrito** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada creará un identificador para su "carrito". Puede añadir tantos artículos como desee antes de validar. +>> > +>> > En este caso, el pedido de un vRack es gratuito. Recupere el número de su carrito (cartId), será indispensable para continuar. +>> > +>> +>> **Recuperación de las informaciones necesarias para el pedido del vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada le permitirá recuperar todas las informaciones necesarias para el pedido del vRack. Copie los siguientes elementos: +>> > +>> > *cartId*, *duration*, *planCode*, y *pricingMode*. +>> > +>> +>> **Añadido del vRack al carrito** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada le permitirá añadir el vRack al carrito añadiendo todas las informaciones necesarias para el pedido. +>> > +>> > En el caso del vRack, esto daría por ejemplo: +>> > +>> > cartId: [identificador de su carrito] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Una vez que haya validado el pedido, obtendrá un número de artículo ("itemId"). Consérvelo, le será útil si desea realizar modificaciones antes de validar el carrito. +>> +>> **Validación del carrito** +>> +>> Una vez que todos los artículos estén en su carrito, deberá validar: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada validará el carrito y le creará un bon de commande (orderId). Consérvelo, será necesario para la validación del pedido. +>> > +>> +>> **Validación del pedido final** +>> +>> Para validar el pedido, tiene dos métodos posibles: +>> +>> - Pasar por la URL visible cuando el carrito se valida. +>> Ejemplo de URL: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validar mediante la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Aunque se trata de un bon de commande de 0 €, es necesario simular un pago del bon de commande (orderId). Su bon de commande será entonces validado y su tratamiento comenzará. +>> > +>> +>> Una vez que el bon de commande gratuito se haya validado, puede ser necesario un plazo de unos minutos para que el vRack esté activo. +>> +>> **Paso 2: Añadir su proyecto Public Cloud al vRack** +>> +>> Una vez que el vRack esté activo, deberá integrar su o sus proyectos Public Cloud en el vRack. +>> +>> Conéctese a las APIv6 de OVHcloud siguiendo el guía "[Primeros pasos con las API de OVHcloud](/pages/manage_and_operate/api/first-steps)". +>> +>> En el caso de que el identificador del proyecto Public Cloud no sea conocido, las llamadas siguientes le permitirán recuperarlo. +>> +>> **Identificación del proyecto** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite recuperar la lista de proyectos. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite identificar el proyecto gracias al campo "description". +>> > +>> +>> **Añadido del proyecto al vRack** +>> +>> Una vez conocido el identificador del proyecto y el nombre del vRack, su asociación se hace mediante la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Rellene los campos de la llamada con las informaciones recogidas anteriormente: +>> +>> - **serviceName**: nombre del vRack en la forma "pn-xxxxxx". +>> - **project**: identificador del proyecto Public Cloud, en forma de cadena de 32 caracteres. +>> +>> > [!primary] +>> > +>> > Esta llamada inicializa la asociación del proyecto al vRack, hay que recuperar entonces el identificador de la tarea para verificar su avance. +>> > +>> +>> **Verificación del avance de la tarea de añadido** +>> +>> Puede consultar la evolución del añadido del proyecto en el vRack gracias a esta llamada: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada es opcional y permite simplemente verificar el estado de la tarea. Una vez que esta esté terminada, puede pasar al paso siguiente. +>> > +>> + +### Paso 2: Crear una red privada en el vRack + +Es necesario crear una red privada con una red local virtual (VLAN) para que las instancias conectadas al vRack puedan comunicarse entre sí. + +En la oferta Public Cloud, puede crear hasta 4 000 VLAN en un solo vRack. Esto significa que puede utilizar cada dirección IP privada hasta 4 000 veces. Así, por ejemplo, la IP 192.168.0.10 de la VLAN 2 es diferente de la IP 192.168.0.10 de la VLAN 42. -Esto puede ser útil para segmentar el vRack entre varias redes virtuales. +Esto puede serle útil para segmentar su vRack entre varios redes virtuales. -Desde el área de cliente de OVHcloud, puede asignar la VLAN que desee y personalizar el rango de IP privadas. +Desde el área de cliente de OVHcloud y las APIv6 de OVHcloud, podrá personalizar todos los parámetros: modo y región de implementación, nombre e ID de la VLAN, rango de direcciones IP privadas (por ejemplo, 10.0.0.0/16), DHCP y puerta de enlace. > [!primary] -> En los servidores dedicados, por defecto está en la VLAN 0. Para que la infraestructura OpenStack funcione, deberá indicar el número de su VLAN directamente a nivel de la infraestructura. -> -> A diferencia de los servidores dedicados, no es necesario « etiquetar » la VLAN directamente en una instancia de Public Cloud. -> -> Para más información sobre la gestión de las VLAN del vRack de los servidores dedicados, consulte la siguiente guía: [Crear varias VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -> [!warning] -> El vRack es una infraestructura gestionada a nivel de OVHcloud, por lo que solo podrá administrarla desde el área de cliente de OVHcloud y las APIv6 de OVHcloud. +> En los Servidores dedicados, por defecto, está en la VLAN 0. El funcionamiento de la infraestructura OpenStack hace que deba especificar directamente el número de su VLAN a nivel de infraestructura. > -> OpenStack no está situada al mismo nivel de la infraestructura, por lo que no podrá personalizar las VLAN a través de Horizon o de las API OpenStack. +> A diferencia de los Servidores dedicados, no es necesario "etiquetar" directamente la VLAN en una instancia Public Cloud. > - -#### Crear una red privada desde el área de cliente de OVHcloud - -Una vez creado el vRack, el siguiente paso es crear una red privada. - -En la pestaña Public Cloud , haga clic en `Private Network`{.action} en el menú de la izquierda, en **Network**. - -![Creación de la VLAN](images/vrack2022-03.png){.thumbnail} - -A continuación, haga clic en `Crear una red privada`{.action}. La página siguiente le permitirá personalizar varios parámetros. - -En el paso 1, seleccione la región en la que quiere crear la red privada. - -![select region](images/vrack5-2024.png){.thumbnail} - -En la siguiente etapa podrá elegir entre una serie de opciones: - -![create network](images/vrack6-2022.png){.thumbnail} - -En el campo **Nombre de la red privada**, defina un nombre para la red privada. - -**Cree un servicio Gateway y conéctese a la red privada** - -Seleccione esta opción si quiere crear instancias únicamente con una red privada. Para más información, consulte las siguientes guías: [Creating a private network with Gateway (EN)](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) y [Crear y conectarse a una instancia de Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps). +> Para más información sobre la gestión de las VLAN del vRack de los Servidores dedicados, consulte este guía: [Crear múltiples VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). > [!warning] -> Si la opción aparece atenuada, significa que es incompatible con la región seleccionada. Para más información, consulte nuestra página sobre la [disponibilidad de productos de Public Cloud para cada región](/links/public-cloud/regions-pci). +> El vRack es una infraestructura gestionada a nivel de OVHcloud, por lo que solo podrá administrarlo a través del área de cliente de OVHcloud y de las APIv6 de OVHcloud. > - -**Opciones de red de la capa 2 (L2)** - -Si marca la casilla `Indicar un ID de VLAN`, deberá elegir un número de VLAN de 0 a 4000. - -Si no activa esta casilla, el sistema asignará un número de VLAN aleatoria. - -Si desea que los servidores dedicados de OVHcloud se comuniquen con una VLAN « etiquetada », consulte la siguiente guía: [Crear varias VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**Opciones de distribución de direcciones DHCP** - -El intervalo DHCP predeterminado es 10.0.0.0/16. Puede utilizar otro rango privado de su elección. - -Una vez hecha su elección, haga clic en `Crear`{.action} para iniciar el proceso. - -> [!primary] -> La creación de la red privada puede tardar varios minutos. +> OpenStack no está situado al mismo nivel de la infraestructura, por lo que no podrá personalizar las VLAN a través de la interfaz Horizon o de las API OpenStack. > -#### Crear una red privada desde las APIv6 de OVHcloud - -Para crear una red privada desde las APIv6 de OVHcloud, haga clic [aquí](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) (EN), para consultar la guía específica. - -#### Crear una red privada a través de Terraform - -En Terraform, necesitas usar el proveedor openstack. Puedes descargar un script terraform de ejemplo completo desde [este repositorio](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -La parte específica de OVHcloud para la integración con vRack es el parámetro `value_specs`. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` - -### Etapa 3: Integrar una instancia en el vRack - -Puede darse dos situaciones: +> [!tabs] +> Desde el área de cliente de OVHcloud +>> Una vez que su vRack esté creado, el siguiente paso consiste en crear una red privada. +>> +>> En la pestaña `Public cloud`{.action}, haga clic en `Private Network`{.action} en el menú de la izquierda bajo **Network**. +>> +>> ![Creación de VLAN](images/vrack2022-03.png){.thumbnail} +>> +>> Haga clic ahora en `Crear una red privada`{.action}. La página siguiente le permitirá personalizar varios parámetros. +>> +>> Para empezar, seleccione un modo de despliegue así como la región en la que desea crear la red privada. +>> +>> ![seleccionar región](images/vrack5-2024.png){.thumbnail} +>> +>> En la siguiente etapa, se le presentan varias opciones: +>> +>> ![crear red](images/vrack6-2022.png){.thumbnail} +>> +>> En el campo **Nombre de la red privada**, defina un nombre para su red privada. +>> +>> **Opción de red de la capa 2** +>> +>> Si marca la casilla `Establecer un ID de VLAN`{.action}, deberá elegir un número de VLAN comprendido entre 0 y 4000. +>> +>> Si no marca esta casilla, el sistema asignará un número de VLAN aleatorio. +>> +>> En el caso en que deba hacer comunicar Servidores dedicados OVHcloud con VLAN etiquetados, consulte el siguiente guía: [Crear varios VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **Opciones de distribución de direcciones DHCP** +>> +>> El rango DHCP por defecto es 10.1.0.0/16. Puede utilizar otro rango privado a su elección o desactivar el DHCP para esta red privada. +>> +>> **Opciones de puerta de enlace de red** +>> +>> - **Anunciar la primera dirección de un CIDR determinado como puerta de enlace predeterminada (opción DHCP 3)**: Cuando esta opción está activada, el servidor DHCP anuncia la primera dirección del CIDR como puerta de enlace predeterminada a las máquinas conectadas a la red. +>> - **Asignar un servicio Gateway y conectarse a la red privada**: Seleccione esta opción si tiene la intención de crear instancias con una red privada únicamente. Para más información, le invitamos a consultar las siguientes guías: [Crear una red privada con una Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) y [Crear una primera instancia Public Cloud y conectarse a ella](/pages/public_cloud/Compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > Si la segunda opción está gris, significa que es incompatible con la región seleccionada. Para más información, consulte nuestra página sobre la [disponibilidad de los productos Public Cloud para cada región](/links/public-cloud/regions-pci). +>> > +>> +>> Una vez que haya tomado sus decisiones, haga clic en `Configure su red privada`{.action} para iniciar el proceso. +>> +>> > [!primary] +>> > +>> > La creación de la red privada puede tardar varios minutos. +>> > +>> +> Desde las APIv6 de OVHcloud +>> +>> Una vez conectado a la [APIv6 de OVHcloud](/links/api), ejecute los siguientes comandos en orden. +>> +>> **Paso 1 - Recuperación de las informaciones necesarias:** +>> +>> **Proyecto Public Cloud** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite recuperar la lista de proyectos. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite identificar el proyecto gracias al campo "description". +>> > +>> +>> **vRack concernido** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > En el campo serviceName, indique el identificador de su proyecto. Conserve la información relativa al identificador del vRack bajo la forma "pn-xxxxx". +>> > +>> +>> **Paso 2 - Creación de la red privada:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Rellene los campos con las informaciones obtenidas anteriormente: +>> > +>> > - **serviceName**: ID del proyecto. +>> > - **name**: el nombre que quiere dar al VLAN. +>> > +>> > Puede dejar el campo "Region" vacío para que se active para todas las regiones. +>> > +>> > El identificador del VLAN (vlanId) es necesario si desea crear un VLAN específico. +>> > +>> +>> La creación tarda unos instantes. +>> +>> Para verificar las informaciones de sus VLAN, puede utilizar la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Esta llamada permite recuperar el networkId. Este se presentará bajo la forma siguiente: nom-vrack_vlanId. +>> > +>> > Por ejemplo, para el VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Paso 3 - Creación del subred:** +>> +>> Por defecto, si no añade un subred, el rango de IP utilizado es el siguiente: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> Si desea gestionar usted mismo las asignaciones de IP, deberá crear un subred. +>> +>> Para ello, una vez que el VLAN esté creado, deberá crear el subred para cada zona afectada mediante la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Puede rellenar los campos como sigue: +>> +>> |Campo|Descripción| +>> |---|---| +>> |serviceName|Identificador de su proyecto.| +>> |networkId|Identificador de su red obtenido durante los comandos anteriores. Por ejemplo: pn-xxxxxx_42 para el VLAN 42.| +>> |dhcp|Casilla marcada para activación / desmarcada para desactivación del DHCP en el VLAN.| +>> |end|Última dirección del subred de la región. Por ejemplo: 192.168.1.50.| +>> |network|Bloque IP del subred. Por ejemplo: 192.168.1.0/24.| +>> |region|Ejemplo: SBG3.| +>> |start|Primera dirección del subred para esta región Por ejemplo: 192.168.1.15.| +>> +>> > [!primary] +>> > +>> > Esta es la etapa de creación del subred por región. Puede activar o no la asignación de direcciones IP privadas de forma dinámica mediante DHCP. +>> > +>> > Deberá realizar la misma operación para cada zona en la que estén sus instancias. +>> > +>> +>> > [!warning] +>> > +>> > Asegúrese de separar bien sus pools de direcciones IP para las diferentes regiones. Por ejemplo: +>> > +>> > - De 192.168.0.2 a 192.168.0.254 para SBG1. +>> > - De 192.168.1.2 a 192.168.1.254 para GRA1. +>> > +>> +> Desde Terraform +>> +>> En Terraform, hay que utilizar el provider OpenStack. Puede descargar un ejemplo de script terraform completo en [este depósito GitHub](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> La parte específica de OVHcloud para la integración vRack es el parámetro `value_specs`. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Desde la CLI OpenStack +>> En el ejemplo siguiente, especificamos el `VLAN_ID` al que queremos que la red pertenezca mediante `--provider-network-type` y `--provider-segment`. +>> +>> Puede eliminar estos parámetros. En este caso, se utilizará un `VLAN_ID` disponible. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> + +### Paso 3: Integrar una instancia en el vRack + +Dos situaciones pueden presentarsele: - La instancia aún no existe. - La instancia ya existe y debe añadirla al vRack. -**Caso de una nueva instancia** - -#### Desde el área de cliente de OVHcloud - -Consulte la guía [Crear una instancia desde el área de cliente](/pages/public_cloud/compute/public-cloud-first-steps). Al crear una instancia, podrá especificar, en el paso 5, un modo de red y, a continuación, una red privada en la que integrar su instancia. - -![attach new instance](images/network-selection.png){.thumbnail} +/// details | **Caso de una nueva instancia** + +> [!tabs] +> Desde el área de cliente de OVHcloud +>> Consulte la guía "[Cómo crear una instancia de Public Cloud y conectarse a ella](/pages/public_cloud/Compute/public-cloud-first-steps)". Durante la creación de una instancia, puede elegir en el paso 5, un modo de red y luego una red privada en la que integrar su instancia. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > Al crear una nueva instancia, solo podrá conectar su instancia a **un único** vRack desde el área de cliente de OVHcloud. +>> > +>> > Para añadir varias interfaces diferentes, deberá utilizar las API OpenStack o Horizon. +>> > +>> +> Desde las APIv6 de OVHcloud +>> Una vez conectado a la [APIv6 de OVHcloud](/links/api), ejecute los siguientes comandos en orden. +>> +>> **Paso 1 - Recuperación de la información necesaria** +>> +>> **Recuperación del identificador del proyecto:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Recuperación del networkID de la red pública (EXT-NET)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Recuperación del networkID de la red privada (interfaz vRack creada anteriormente)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > El identificador obtenido tiene la forma: "pn-xxxxx_yy" donde yy es el número del VLAN. +>> > +>> +>> **Recuperación del identificador del tipo de instancia elegido (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > Puede limitar la lista indicando la zona de creación de su instancia. +>> > +>> +>> **Recuperación del identificador de la imagen elegida (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > Puede limitar la lista indicando la zona de creación de su instancia. +>> > +>> +>> **Recuperación del identificador de su clave SSH OpenStack (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> Si aún no ha añadido una clave SSH a su área de cliente, puede hacerlo a través de la siguiente función API: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> **Paso 2 - Despliegue de la instancia** +>> +>> Una vez reunidos todos los elementos necesarios para el despliegue, puede utilizar la llamada siguiente: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> Deberá rellenar al menos los siguientes campos: +>> +>> |Campo|Descripción| +>> |---|---| +>> |serviceName|Identificador del proyecto Public Cloud concernido.| +>> |flavorId|Identificador del tipo de instancia (por ejemplo: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|Identificador de la imagen de despliegue (por ejemplo: Debian 9, Centos 7, etc.).| +>> |name|Nombre que le da a su instancia.| +>> |networks|En la parte "networkId", indique el identificador de la red pública (ext-net) o el de su VLAN (pn-xxxxxx_yy). Puede hacer clic en el botón "+" para añadir otras redes.| +>> |region|Regiones de despliegue de la instancia (por ejemplo: GRA5).| +>> |sshKeyId|Identificador de su clave SSH OpenStack.| +>> +>> Una vez realizada la llamada, si todas las informaciones están correctamente rellenadas, la instancia se creará con una o varias interfaces de red. +>> +>> > [!warning] +>> > +>> > Según los sistemas operativos, deberá configurar manualmente sus interfaces de red privadas para que se tome en cuenta.
+>> > OpenStack no siendo capaz de priorizar la interfaz pública de la interfaz vRack, puede ocurrir que esta última pase a ser la ruta por defecto.
+>> > La consecuencia directa es que la instancia no sea accesible desde una IP pública.
+>> > Un o varios reinicios de la instancia desde el espacio cliente pueden permitir restablecer la situación.
+>> > Otra solución consiste en conectarse a la instancia en SSH a través de otro de sus servidores presentes en la misma red privada. También puede corregir la configuración de red de la instancia a través del modo Rescue. +>> > +>> +> Desde la CLI OpenStack +>> **Recuperación de la información necesaria** +>> +>> Identificación de las redes públicas y privadas: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MiVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MiVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MiVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MiVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Deberá anotar los ID de las redes que le interesan: +>> > +>> > - Ext-Net para tener una IP pública. +>> > - El del o de los VLAN necesarios para su configuración. +>> > +>> +>> También deberá anotar las siguientes informaciones, como se indica en el [guía de uso de la API Nova](/pages/public_cloud/Compute/starting_with_nova): +>> +>> - ID o nombre de la clave SSH OpenStack. +>> - ID del tipo de instancia (flavor). +>> - ID de la imagen deseada (Sistema operativo, snapshot, etc.). +>> +>> **Despliegue de la instancia** +>> +>> Con los elementos recuperados anteriormente, es posible crear una instancia incluyéndola directamente en el vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Por ejemplo: +>> +>> ```bash +>> nova boot --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nombre de la clave] | +>> | metadata | {} | +>> | name | [Nombre de su instancia] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Por ejemplo: +>> +>> ```bash +>> openstack server create --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nombre de la clave] | +>> | metadata | {} | +>> | name | [Nombre de su instancia] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> Usted tiene la posibilidad de definir la dirección IP de la interfaz vRack de su instancia a nivel de OpenStack. +>> +>> Para ello, puede añadir un argumento sencillo en la función "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Por ejemplo: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verificación de la instancia** +>> +>> Después de unos minutos, puede verificar la lista de las instancias existentes para encontrar el servidor creado: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+--------------------------+--------+--------------------------------------------------+--------------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------------------+--------+--------------------------------------------------+--------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Nombre de la instancia] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | [Nombre de la instancia] | +>> +--------------------------------------+--------------------------+--------+--------------------------------------------------+--------------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Nombre de la instancia] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **Caso de una instancia ya existente** + +El área de cliente de OVHcloud permite adjuntar una instancia a una o varias redes privadas, pero no ofrece una configuración avanzada de las interfaces de red. Si desea personalizar más estas interfaces, deberá gestionarlas desde las APIv6 de OVHcloud, desde las API de OpenStack o desde Horizon. + +La acción consistirá simplemente en añadir una nueva interfaz de red a su servidor, además de la existente. + +Por ejemplo, si tiene una interfaz pública *eth0*, tendrá además una interfaz *eth1*. > [!warning] -> Al crear una nueva instancia, solo podrá conectar su instancia a un único vRack desde el área de cliente de OVHcloud. -> Para añadir varias interfaces diferentes, debe utilizar las API de OpenStack u Horizon. +> La configuración de esta nueva interfaz rara vez es automática. Por lo tanto, deberá configurarla en DHCP o con una IP fija según su infraestructura. > -#### Desde la APIv6 de OVHcloud - -Haga clic [aquí](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) (EN), para consultar la guía específica sobre este método. - -**Caso de una instancia ya existente** - -El área de cliente de OVHcloud permite asociar una instancia a una o más redes privadas, pero no ofrece una configuración avanzada de las interfaces de red. Si quiere personalizarlas más, deberá administrarlas, o bien a través de las API de OVHcloud, o bien a través de las API de OpenStack, o bien a través de Horizon. - -Añada una nueva interfaz de red al servidor, además de la que ya existe. - -Por ejemplo, si tiene una interfaz pública *eth0*, agregará la interfaz *eth1*. +> [!tabs] +> Desde el área de cliente de OVHcloud +>> Inicie sesión en su [área de cliente de OVHcloud](/links/manager), vaya a la sección `Public Cloud`{.action} y seleccione el proyecto Public Cloud correspondiente en la esquina superior izquierda. +>> +>> Haga clic en `Instancias`{.action} en el menú lateral izquierdo. A continuación, haga clic en el botón `⁝`{.action} a la derecha de la instancia correspondiente y luego en `Detalles de la instancia`{.action}. +>> +>> ![detalles de la instancia](images/instance_details.png){.thumbnail} +>> +>> Se le mostrará el panel de control de su instancia. Haga clic en el botón `⁝`{.action} a la derecha de "Redes privadas" y luego en `Asociar una red`{.action}. +>> +>> ![adjuntar red](images/vrack2021-01.png){.thumbnail} +>> +>> En la ventana emergente que aparece, seleccione la o las redes privadas que desee adjuntar a su instancia y haga clic en `Confirmar`{.action}. +>> +>> ![adjuntar red](images/vrack9.png){.thumbnail} +>> +> Desde las APIv6 de OVHcloud +>> La acción consistirá simplemente en añadir una nueva interfaz de red a su servidor, además de la existente. +>> +>> Por ejemplo, si el servidor dispone de una interfaz pública eth0, se añadirá una interfaz adicional eth1. +>> +>> > [!primary] +>> > +>> > La configuración de esta nueva interfaz rara vez es automática.
+>> > Deberá por tanto configurarla en DHCP o con una IP fija según su infraestructura. +>> > +>> +>> **Los pasos siguientes describen cómo gestionar las interfaces de red de sus instancias.** +>> +>> **Paso 1 - Recuperación de la información necesaria** +>> +>> **Recuperación del identificador del proyecto:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Recuperación del identificador de la instancia:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Recuperación del networkID de la red pública (EXT-NET):** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Recuperación del networkID de la red privada (interfaz vRack creada anteriormente):** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > El identificador obtenido tiene la forma: "pn-xxxxx_yy" donde yy es el número del VLAN. +>> > +>> +>> **Paso 2 - Añadido de una interfaz a su instancia** +>> +>> Una vez recuperada toda la información necesaria, puede utilizar el siguiente llamado: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> Deberá rellenar al menos los siguientes campos: +>> +>> |Campo|Descripción| +>> |---|---| +>> |serviceName|Identificador del proyecto Public Cloud correspondiente.| +>> |instanceId|Identificador de la instancia correspondiente.| +>> |networkId|Indique el identificador de la red pública (ext-net) o el de su VLAN (pn-xxxxxx_yy).| +>> |ip|Definir una IP específica (funciona únicamente para interfaces privadas).| +>> +>> Una vez realizado el llamado, si todas las informaciones están correctamente rellenadas, una nueva interfaz se añadirá a su instancia. +>> +>> > [!primary] +>> > +>> > Su instancia OVHcloud dispondrá por tanto de una nueva interfaz de red además de la interfaz pública (Ext-net).
+>> > Podrá ver, en el resumen de la instancia, la dirección IP privada asignada automáticamente a su interfaz.
+>> > Será su responsabilidad utilizarla configurando su interfaz mediante DHCP o utilizando sus propias IP mediante una configuración en IP estática. +>> > +>> +>> **Paso 3 - Desenganchar una interfaz de su instancia** +>> +>> > [!warning] +>> > +>> > Desenganchar una interfaz de red la eliminará inmediatamente. +>> > +>> > Sin embargo, es importante señalar que si desengancha la interfaz "Ext-Net" (IP pública), esta dirección se liberaría y se pondría en circulación. No podría por tanto reclamarla.
+>> > Esta acción solo debe realizarse si desea aislar su servidor en el vRack (red privada) o, por el contrario, retirarlo de uno o varios VLAN. +>> > +>> +>> Una vez recuperada toda la información necesaria, puede utilizar el siguiente llamado para eliminar una interfaz: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> Deberá rellenar al menos los siguientes campos: +>> +>> |Campo|Descripción| +>> |---|---| +>> |serviceName|Identificador del proyecto Public Cloud correspondiente.| +>> |instanceId|Identificador de la instancia correspondiente.| +>> |networkId|Indique el identificador de la red pública (ext-net) o el de su VLAN (pn-xxxxxx_yy).| +>> +> Desde OpenStack Horizon +>> Inicie sesión en la interfaz [Horizon](https://horizon.cloud.ovh.net/auth/login/) siguiendo el método indicado en la [primera parte de este guía](#horizon). +>> +>> Inicie sesión en su zona de trabajo: +>> +>> ![conexión Horizon](images/horizon1.png){.thumbnail} +>> +>> Vaya a `Compute`, y luego a `Instances`: +>> +>> ![Horizon Compute instances](images/horizon2.png){.thumbnail} +>> +>> **Añadido de una interfaz de red privada** +>> +>> Para añadir una interfaz, en la columna `Actions`, haga clic en la flecha que permite acceder a las acciones posibles sobre la instancia. Haga clic a continuación en `Attach Interface`{.action}: +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Seleccione su interfaz y valide: +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Su instancia OVHcloud dispondrá por tanto de una nueva interfaz de red además de la interfaz pública (Ext-net).
+>> > Podrá ver, en el resumen de la instancia, la dirección IP privada asignada automáticamente a su interfaz.
+>> > Será su responsabilidad utilizarla configurando su interfaz mediante DHCP o utilizando sus propias IP mediante una configuración en IP estática. +>> > +>> +>> **Desenganchar una interfaz de red** +>> +>> > [!warning] +>> > +>> > Desenganchar una interfaz de red la eliminará inmediatamente. +>> > +>> > Sin embargo, es importante señalar que si desengancha la interfaz "Ext-Net" (IP pública), esta dirección se liberaría y se pondría en circulación. No podría por tanto reclamarla.
+>> > Esta acción solo debe realizarse si desea aislar su servidor en el vRack (red privada) o, por el contrario, retirarlo de uno o varios VLAN. +>> > +>> +>> Para desenganchar una interfaz de red privada, en la columna `Actions`, haga clic en la flecha que permite acceder a las acciones posibles sobre la instancia. Haga clic a continuación en `Detach Interface`{.action}: +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Seleccione la interfaz a eliminar y valide: +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Desde la CLI OpenStack +>> **Recuperación de la información necesaria** +>> +>> Identificación de sus instancias: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Mi-instancia | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MonVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Mi-instancia | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MonVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Identificación de las redes públicas y privadas: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MiVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MiVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MiVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MiVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Deberá anotar los ID de las redes que le interesen: +>> > +>> > - Ext-Net para tener una IP pública. +>> > - El de los VLAN necesarios para su configuración. +>> > +>> +>> **Añadido de una interfaz de red privada** +>> +>> Para adjuntar una nueva interfaz, puede realizar el siguiente comando: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Por ejemplo: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> Puede verificar que la acción ha sido correctamente realizada: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => su IP pública +>> | MiVLAN-42 network | 192.168.0.x | => su IP privada +>> [...] +>> ``` +>> +>> o +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MiVLAN-42=192.168.0.x | => su IP pública ; su IP privada +>> [...] +>> ``` +>> + +### Desenganchar una interfaz de red > [!warning] -> La configuración de esta nueva interfaz rara vez es automática. -> Deberá configurarla en DHCP o IP fija según su infraestructura. +> Desenganchar una interfaz de red la eliminará inmediatamente. +> +> Sin embargo, es importante señalar que si desengancha la interfaz "Ext-Net" (IP pública), esta dirección se liberaría y se pondría en circulación. No podría por tanto reclamarla.
+> Esta acción solo debe realizarse si desea aislar su servidor en el vRack (red privada) o, por el contrario, retirarlo de uno o varios VLAN. > -#### Desde el área de cliente de OVHcloud - -Conéctese al [área de cliente de OVHcloud](/links/manager), acceda a la sección `Public Cloud`{.action} y seleccione el proyecto de Public Cloud correspondiente en la parte superior izquierda. - -En la columna izquierda, haga clic en `Instancias`{.action}. Haga clic en el botón `...`{.action} a la derecha de la instancia correspondiente y, seguidamente, en `Detalles de la instancia`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -Se mostrará el panel de control de la instancia. Haga clic en el botón `...`{.action} a la derecha de "Red(es) privada(s)" y, seguidamente, en `Asociar una red`{.action}. - -![conexión de red](images/vrack2021-01.png){.thumbnail} - -En la nueva ventana, seleccione la red o redes privadas que quiera asociar a la instancia y haga clic en `Asociar`{.action}. - -![conexión de red](images/vrack9.png){.thumbnail} - -#### Gestión de las interfaces de red desde las APIv6 de OVHcloud - -Haga clic [aquí](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) (EN), para consultar la guía específica sobre este método. - -#### Gestión de las interfaces de red desde OpenStack Horizon - -Conéctese a la interfaz [Horizon](https://horizon.cloud.ovh.net/auth/login/) utilizando el método que se indica en la [primera parte de esta guía](./#interfaz-horizon). - -Conéctese a su zona de trabajo: - -![connexion Horizon](images/horizon1.png){.thumbnail} - -Acceda a `Compute` y seleccione `Instances`. - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Añadir una interfaz privada** - -Para añadir una interfaz, haga clic en la flecha que le permitirá acceder a las acciones que pueda realizar en la instancia, en la columna "Actions". Haga clic en `Attach Interface`{.action}. - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Seleccione la interfaz y acepte: - -![Horizon attach interface](images/horizon4.png){.thumbnail} +Para desenganchar una interfaz de red, necesitará en primer lugar identificar el puerto Neutron que se haya creado. -> [!primary] -> El servicio de OVHcloud dispondrá de una nueva interfaz de red, además de la interfaz pública (Ext-net). ->
En el resumen de la instancia, podrá ver la dirección IP privada asignada automáticamente a su interfaz. ->
que deberá utilizar configurando la interfaz a través del DHCP o utilizando sus propias IP mediante una configuración de IP estática. -> +Para ello, puede utilizar los siguientes comandos: -**Desvincular una interfaz de red** +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` -> [!warning] -> Desvincular una interfaz de red hace que se elimine inmediatamente. -> -> Sin embargo, es importante tener en cuenta que si desvincula la interfaz «Ext-Net» (IP pública), esta dirección se liberará y volverá a poner en circulación. Así que no podrías reasignarla. ->
Esta acción solo debe realizarse si desea aislar su servidor en el vRack (red privada) o en caso contrario, sacarlo de una o varias VLAN. -> +o + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -Para desvincular una interfaz red privata, haga clic en la flecha que le permitirá acceder a las acciones que pueda realizar en la instancia, en la columna "Actions". Haga clic en `Detach Interface`{.action}. +Una vez identificado el puerto que desea eliminar, puede ejecutar el siguiente comando: -![Horizon detach interface](images/horizon5.png){.thumbnail} +```bash +nova interface-detach +``` -Seleccione la interfaz que desea eliminar y acepte: +Por ejemplo: -![Horizon detach interface](images/horizon6.png){.thumbnail} +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` +/// ## Más información -[Configuración del vRack Public Cloud desde las APIv6 de OVHcloud](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) (EN) - -[Servidores dedicados - Crear varias VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +[Servidores dedicados - Crear varios VLAN en el vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) -Si necesita formación o asistencia técnica para implantar nuestras soluciones, póngase en contacto con su representante de ventas o haga clic en [este enlace](/links/professional-services) para obtener un presupuesto y solicitar un análisis personalizado de su proyecto a nuestros expertos del equipo de Servicios Profesionales. +Si necesita formación o asistencia técnica para la implementación de nuestras soluciones, póngase en contacto con su comercial o haga clic en [este enlace](/links/professional-services) para obtener un presupuesto y solicitar un análisis personalizado de su proyecto a nuestros expertos del equipo de Professional Services. Interactúe con nuestra [comunidad de usuarios](/links/community). \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.fr-ca.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.fr-ca.md index c51e3816150..abe08fe9b96 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.fr-ca.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.fr-ca.md @@ -1,9 +1,23 @@ --- title: 'Configuration du vRack Public Cloud' excerpt: 'Découvrez comment configurer un vRack Public Cloud' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objectif Le [vRack](/links/network/vrack) est un réseau privé qui vous permet de configurer l’adressage entre plusieurs serveurs dédiés OVHcloud. Mais il vous permet également d’ajouter des [instances Public Cloud](/links/public-cloud/compute) à votre réseau privé afin de créer une infrastructure de ressources physiques et virtuelles. @@ -25,27 +39,33 @@ Selon votre profil technique et vos besoins, vous serez amenés à devoir choisi **Voici un descriptif rapide des actions possibles suivant la méthode/interface choisie :** -### Espace client OVHcloud +/// details | Espace client OVHcloud -[L'espace client OVHcloud](/links/manager) est une interface entièrement et uniquement visuelle, ce qui en fait une interface idéale à la gestion de plusieurs VLAN. Vous aurez également la possibilité de personnaliser la plage d'IP privée qui, par défaut, est 10.x.x.x/16. +[L'espace client OVHcloud](/links/manager) est une interface entièrement et uniquement visuelle, ce qui en fait une interface idéale à la gestion de plusieurs VLAN. Vous aurez également la possibilité de personnaliser la plage d'IP privée qui, par défaut, est 10.1.0.0/16. Les VLAN seront déployés dans la Région sélectionnée. Vous aurez également la possibilité d'activer ou non les passerelles, d'activer les distributions DHCP, etc. Vous pourrez également gérer la facturation de vos services au travers de votre espace client OVHcloud. -### Interface Horizon +/// + + + +/// details | Interface Horizon Interface visuelle indépendante d'OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) est l'implémentation d’origine du tableau de bord d'OpenStack, qui fournit une interface utilisateur web aux services OpenStack, notamment Nova, Swift, Keystone, etc. Cette interface complète et technique vous permet de gérer la quasi totalité des actions OpenStack. Ce sera une des interfaces nécessaires si vous souhaitez gérer plus de deux VLAN, ajouter des interfaces réseau privées à vos instances, gérer des images personnalisées, etc. -Consultez le guide [Accéder à l'interface Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) pour vous familiariser à Horizon. +Consultez le guide « [Présentation de Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) » pour vous familiariser à Horizon. > [!primary] > Horizon fonctionnant par zone, pensez bien à choisir votre zone géographique de travail tout en haut à gauche de votre interface (GRA5, SBG3, BHS1, etc.) > -### APIv6 OVHcloud +/// + +/// details | APIv6 OVHcloud Chaque action que vous effectuez dans l'espace client OVHcloud fait appel aux [APIv6 OVHcloud](/links/api). Vous pouvez même aller plus loin dans les API que dans votre espace client. @@ -58,19 +78,21 @@ Vous pouvez simplement accéder aux API depuis [notre page web](/links/api), mai Ainsi, il vous sera possible de librement automatiser les tâches de base au moyen de scripts, optimiser vos propres fonctions, etc. -Consultez le guide [Premiers pas avec les API OVHcloud](/pages/manage_and_operate/api/first-steps) pour vous familiariser avec l'utilisation des APIv6 OVHcloud. +Consultez le guide « [Premiers pas avec les API OVHcloud](/pages/manage_and_operate/api/first-steps) » pour vous familiariser avec l'utilisation des APIv6 OVHcloud. -### API OpenStack +/// + +/// details | API OpenStack Il est possible d’administrer les services Public Cloud à l’aide de lignes de commandes Linux ou Windows, après le téléchargement et l’installation des outils OpenStack. Cette méthode demande de bonnes connaissances Linux ou Windows pour en profiter, mais elle permet de profiter de toute la puissance d'OpenStack par ce biais. -Suivant la couche que vous souhaitez gérer, vous devrez utilisez le client Nova (Compute), Neutron (réseau), Glance (Image) ou encore Swift (Object Storage). Le dernier né de la famille, le client OpenStack, vous permet de gérer directement la quasi intégralité des couches OpenStack. +Suivant la couche que vous souhaitez gérer, vous devrez utiliser le client Nova (Compute), Neutron (réseau), Glance (image) ou encore Swift (Object Storage). Le dernier né de la famille, le client OpenStack, vous permet de gérer directement la quasi intégralité des couches OpenStack. Grâce à l’API OpenStack, vous pouvez aussi facilement automatiser cette gestion au travers de vos scripts. -Afin de vous familariser avec l'API OpenStack, consultez tout d'abord les guides suivants : +Afin de vous familiariser avec l'API OpenStack, consultez tout d'abord les guides suivants : - [Préparer l’environnement pour utiliser l’API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) - [Charger les variables d’environnement OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) @@ -90,45 +112,235 @@ Vous pourrez alors, suivant votre besoin, utiliser les API dédiées à OpenStac > Vous pouvez consulter à tout moment la [documentation officielle d'OpenStack](https://docs.openstack.org/fr/) si vous souhaitez aller plus loin dans leur utilisation. > -Pour plus d'informations, consultez ce guide : [Configuration du vRack Public Cloud l'aide de l'OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | CLI OpenStack -Terraform permet aussi de gérer les infrastructures d’OVHcloud. +Vous pouvez gérer vos services Public Cloud et votre vRack OVHcloud directement depuis votre terminal Linux ou Windows grâce à la CLI OpenStack. -Pour cela, vous devez choisir le bon fournisseur et la bonne ressource Terraform. Retrouvez plus d’informations dans notre [guide d’utilisation de Terraform](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +Cette interface permet de gérer toutes les couches OpenStack : -## En pratique +- Nova : instances (compute) +- Neutron : réseaux +- Glance : images +- Cinder : volumes -### Étape 1 : Activer et gérer un vRack +La CLI centralise ces fonctionnalités et peut être intégrée à vos scripts pour automatiser vos tâches. -#### Depuis l'espace client OVHcloud +Avant de commencer, consultez les guides suivants : + +- [Préparer l’environnement pour utiliser l’API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Charger les variables d’environnement OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> Ceci ne s'applique pas aux projets nouvellement créés qui sont désormais automatiquement livrés avec un vRack. Pour visualiser le vRack une fois le projet créé, rendez-vous dans le section `Network`{.action} dans l’onglet de gauche. Cliquez sur `Réseau Privé vRack`{.action} pour voir le(s) vRack(s). +> +> La CLI OpenStack est pratique pour gérer votre vRack, cependant certaines fonctions peuvent différer selon la version du client ou du système d’exploitation. Consultez la [documentation officielle d'OpenStack](https://docs.openstack.org/fr/). > -Si vous avez un projet plus ancien et que vous n'avez pas de vRack, vous devez en commander un. Ce produit est gratuit et la mise à disposition ne prend que quelques minutes. - -Dans le menu situé à gauche de l'écran, cliquez sur le bouton `Ajouter un service`{.action} (icône de panier d'achat). Utilisez le filtre en haut de la page ou faites défiler vers le bas pour trouver le service `vRack`{.action}. - -![Commander le vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -Vous serez redirigé vers une autre page pour valider la commande, l'opération prendra quelques minutes. +/// details | Terraform -Une fois le service actif, vous le retrouverez dans votre espace client dans la section `Network`{.action} > `Réseau Privé vRack`{.action}. Sous l’appellation « pn-xxxxxx ». +Terraform permet aussi de gérer les infrastructures d’OVHcloud. -Dans la liste des services éligibles, sélectionnez le projet que vous souhaitez ajouter au vRack et cliquez sur le bouton `Ajouter`{.action}. +Pour cela, vous devez choisir le bon fournisseur et la bonne ressource Terraform. Retrouvez plus d’informations dans notre [guide d’utilisation de Terraform](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![ajouter le projet](images/addprojectvrack.png){.thumbnail} +/// -Pour continuer la configuration du vRack depuis l'espace client OVHcloud, poursuivez la lecture de ce guide à partir de [Créer un réseau privé depuis l'espace client OVHcloud](./#creer-un-reseau-prive-depuis-lespace-client-ovhcloud). +## En pratique -#### Depuis les APIv6 OVHcloud +### Étape 1 : Activer et gérer un vRack -Pour activer et gérer un vRack depuis les APIv6 OVHcloud, cliquez [ici](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#etape-1-activer-et-gerer-un-vrack) pour consulter le guide spécifique à cette méthode. +> [!warning] +> +> Le vRack est géré au niveau de l’infrastructure OVHcloud, ce qui signifie que vous ne pouvez l’administrer que depuis votre espace client et les APIv6 OVHcloud. +> -### Étape 2 : Créer un réseau privé dans le vRack +> [!tabs] +> Depuis l'espace client OVHcloud +>> > [!primary] +>> > +>> > Cette étape ne s'applique pas aux projets nouvellement créés, qui sont désormais automatiquement livrés avec un vRack. Pour visualiser le vRack une fois le projet créé, rendez-vous dans la section `Network`{.action} et cliquez sur `Réseau Privé vRack`{.action} pour voir le(s) vRack(s). +>> > +>> +>> Si vous avez un projet plus ancien et que vous n'avez pas de vRack, vous devez en commander un. Ce produit est gratuit et la mise à disposition ne prend que quelques minutes. +>> +>> Dans le menu situé à gauche de l'écran, cliquez sur le bouton `Ajouter un service`{.action} (icône de panier d'achat). Utilisez le filtre en haut de la page ou faites défiler vers le bas pour trouver le service `vRack`{.action}. +>> +>> ![Commander le vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> Vous serez redirigé vers une autre page pour valider la commande, l'opération prendra quelques minutes. +>> +>> Une fois le service actif, vous le retrouverez dans votre espace client dans la section `Network`{.action} > `Réseau Privé vRack`{.action}, sous l’appellation « pn-xxxxxx ». +>> +>> Cliquez sur votre vRack, sélectionnez le projet que vous souhaitez y ajouter dans la liste des services éligibles puis cliquez sur le bouton `Ajouter`{.action}. +>> +>> ![ajouter le projet](images/addprojectvrack.png){.thumbnail} +>> +>> Pour continuer la configuration du vRack depuis l'espace client OVHcloud, poursuivez la lecture de ce guide à partir de l'[étape 2 : Créer un réseau privé dans le vRack](#create-pn-in-vrack), onglet **Depuis l'espace client OVHcloud**. +>> +> Depuis les APIv6 OVHcloud +>> +>> **Étape 1 : Activer et gérer un vRack** +>> +>> Connectez-vous aux APIv6 OVHcloud en suivant le guide « [Premiers pas avec les API OVHcloud](/pages/manage_and_operate/api/first-steps) ». +>> +>> Une fois authentifié, suivez les étapes décrites ci-dessous : +>> +>> **Création du panier** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > Cet appel va créer un identifiant pour votre « panier ». Vous pourrez y ajouter autant d'articles que vous voulez avant de le valider. +>> > +>> > Dans le cas présent, la commande d’un vRack est gratuite. Récupérez le numéro de votre panier (cartId), il sera indispensable pour la suite. +>> > +>> +>> **Récupération des informations nécessaires à la commande du vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Cet appel va vous permettre de récupérer l'ensemble des informations nécessaires à la commande du vRack. Copiez les éléments suivants : +>> > +>> > *cartId*, *duration*, *planCode*, et *pricingMode*. +>> > +>> +>> **Ajout du vRack dans le panier** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Cet appel va vous permettre d'ajouter le vRack au panier en ajoutant l’ensemble des informations nécessaires à la commande. +>> > +>> > Dans le cas du vRack, cela donnerait par exemple : +>> > +>> > cartId : [identifiant de votre panier] +>> > +>> > duration : « P1M » +>> > +>> > planCode : « vrack » +>> > +>> > pricingMode : « default » +>> > +>> > quantity : 1 +>> > +>> +>> Une fois que vous aurez validé la commande, vous obtiendrez un numéro d'article (« itemId »). Conservez cette information, elle vous sera utile si vous souhaitez apporter des modifications avant la validation du panier. +>> +>> **Validation du panier** +>> +>> Une fois l'ensemble des articles mis dans votre panier, vous devrez le valider : +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > Cet appel va valider le panier et vous créer un bon de commande (orderId). Conservez cette information, elle sera nécessaire à la validation de la commande. +>> > +>> +>> **Validation de la commande finale** +>> +>> Pour valider la commande, vous avez deux méthodes possibles : +>> +>> - Passer par l'URL visible lorsque le panier est validé. +>> Exemple d'URL : https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Valider par l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Même s’il s’agit d’un bon de commande à 0 €, il est nécessaire de simuler un paiement du bon de commande (orderId). Votre bon de commande sera alors validé et son traitement commencera. +>> > +>> +>> Une fois le bon de commande gratuit validé, un délai de quelques minutes peut être nécessaire pour que le vRack soit actif. +>> +>> **Étape 2 : Ajouter votre projet Public Cloud dans le vRack** +>> +>> Une fois le vRack actif, il vous faudra intégrer votre ou vos projets Public Cloud dans le vRack. +>> +>> Connectez-vous aux APIv6 OVHcloud en suivant le guide « [Premiers pas avec les API OVHcloud](/pages/manage_and_operate/api/first-steps) ». +>> +>> Dans le cas ou l’identifiant du projet Public Cloud n’est pas connu, les appels suivants vous permettront de le retrouver. +>> +>> **Identification du projet** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet de récupérer la liste des projets. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet d'identifier le projet grâce au champ « description ». +>> > +>> +>> **Ajout du projet dans le vRack** +>> +>> Une fois l’identifiant du projet et le nom du vRack connus, leur association se fait via l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Renseignez les champs de l'appel avec les informations relevées précédemment : +>> +>> - **serviceName** : nom du vRack sous la forme « pn-xxxxxx ». +>> - **project** : identifiant du projet Public Cloud, sous la forme d’une chaîne de 32 caractères. +>> +>> > [!primary] +>> > +>> > Cet appel initialise l’association du projet au vRack, il faut ensuite récupérer l’identifiant de la tâche pour vérifier son avancement. +>> > +>> +>> **Vérification de l'avancement de la tâche d'ajout** +>> +>> Vous pouvez consulter l'évolution de l'ajout du projet dans le vRack grâce à cet appel : +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > Cet appel est facultatif et permet juste de vérifier le statut de la tâche. Une fois celle-ci terminée, vous pouvez passer à l’étape suivante. +>> > +>> + +### Étape 2 : Créer un réseau privé dans le vRack Il est nécessaire de créer un réseau privé avec un réseau local virtuel (VLAN) afin que les instances reliées au vRack puissent communiquer entre elles. @@ -137,93 +349,222 @@ Ainsi, par exemple, l'IP 192.168.0.10 du VLAN 2 est différente de l'IP 192.168. Cela peut vous être utile afin de segmenter votre vRack entre plusieurs réseaux virtuels. -Depuis l'espace client OVHcloud, vous pouvez attribuer le VLAN de votre choix et personnaliser la plage d'IP privées. +Depuis l'espace client OVHcloud et les APIv6 OVHcloud, vous pourrez personnaliser l'ensemble des paramètres : mode et région de déploiement, nom et ID du VLAN, plage d'adresses IP privées (10.0.0.0/16 par exemple), DHCP et Gateway. > [!primary] > Sur les serveurs dédiés, par défaut, vous êtes sur le VLAN 0. Le fonctionnement de l’infrastructure OpenStack fait que vous devrez spécifier le numéro de votre VLAN directement au niveau de l'infrastructure. > -> Contrairement aux serveurs dédiés, il n’est pas nécessaire de « tagguer » le VLAN directement sur une instance Public Cloud. +> Contrairement aux serveurs dédiés, il n’est pas nécessaire de « tagguer » le VLAN directement sur une instance Public Cloud. > -> Pour plus d'informations sur la gestion des VLAN du vRack des serveurs dédiés, vous pouvez consulter ce guide : [Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +> Pour plus d'informations sur la gestion des VLAN du vRack des serveurs dédiés, consultez ce guide : [Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). > [!warning] > Le vRack étant une infrastructure gérée au niveau d'OVHcloud, vous ne pourrez l'administrer qu'au travers de l'espace client OVHcloud et des APIv6 OVHcloud. > -> OpenStack n'étant pas située au même niveau de l'infrastructure, vous ne pourrez pas personnaliser les VLAN au travers de l'interface Horizon ou des API OpenStack. -> - -#### Créer un réseau privé depuis l'espace client OVHcloud - -Une fois votre vRack créé, l’étape suivante consiste à créer un réseau privé. - -Dans l'onglet Public cloud , cliquez sur `Private Network`{.action} dans le menu de gauche sous **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Cliquez à présent sur `Créer un réseau privé`{.action}. La page suivante vous permettra de personnaliser plusieurs paramètres. - -À l'étape 1, sélectionnez la région dans laquelle vous souhaitez créer le réseau privé. - -![select region](images/vrack5-2024.png){.thumbnail} - -À l'étape suivante, un certain nombre d'options vous sont présentées : - -![create network](images/vrack6-2022.png){.thumbnail} - -Dans le champ **Nom du réseau privé**, définissez un nom pour votre réseau privé. - -**Créez une Gateway et connectez-vous au réseau privé** - -Sélectionnez cette option si vous avez l'intention de créer des instances avec un réseau privé uniquement. Pour plus d’informations, nous vous invitons à consulter les guides suivants : [Créer un réseau privé avec une Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) et [Créer une première instance Public Cloud et s’y connecter](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> Si l'option est grisée, cela signifie qu'elle est incompatible avec la région sélectionnée. Pour plus d’informations, veuillez vous référer à notre page sur la [disponibilité des produits Public Cloud pour chaque région](/links/public-cloud/regions-pci). -> - -**Options réseau du layer 2** - -Si vous cochez la case `Définir un VLAN`, vous devrez choisir un numéro de VLAN allant de 0 à 4000. - -Si vous ne cochez pas cette case, le système attribuera un numéro de VLAN aléatoire. - -Dans le cas où vous devez faire communiquer des serveurs dédiés OVHcloud avec du VLAN taggué, consultez le guide suivant : [Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**Options de distribution des adresses DHCP** - -La plage DHCP par défaut est en 10.0.0.0/16. Vous pouvez utiliser une autre plage privée de votre choix. - -Une fois vos choix faits, cliquez sur `Créer`{.action} pour lancer le processus. - -> [!primary] -> La création du réseau privé peut prendre plusieurs minutes. +> OpenStack n'étant pas situé au même niveau de l'infrastructure, vous ne pourrez pas personnaliser les VLAN au travers de l'interface Horizon ou des API OpenStack. > -#### Créer un réseau privé depuis les APIv6 OVHcloud - -Pour créer un réseau privé depuis les APIv6 OVHcloud, cliquez [ici](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#etape-3-creer-un-vlan-dans-le-vrack) pour consulter le guide spécifique à cette méthode. - -#### Créer un réseau privé via Terraform - -Dans Terraform, il faut utiliser le provider openstack. Vous pouvez télécharger un exemple de script terraform complet dans [ce dépôt](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -La partie spécifique à OVHcloud pour l'intégration vRack est le paramètre `value_specs`. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Depuis l'espace client OVHcloud +>> Une fois votre vRack créé, l’étape suivante consiste à créer un réseau privé. +>> +>> Dans l'onglet `Public cloud`{.action}, cliquez sur `Private Network`{.action} dans le menu de gauche sous **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Cliquez à présent sur `Créer un réseau privé`{.action}. La page suivante vous permettra de personnaliser plusieurs paramètres. +>> +>> Pour commencer, sélectionnez un mode de déploiement ainsi que la région dans laquelle vous souhaitez créer le réseau privé. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> À l'étape suivante, un certain nombre d'options vous sont présentées : +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> Dans le champ **Nom du réseau privé**, définissez un nom pour votre réseau privé. +>> +>> **Option réseau du layer 2** +>> +>> Si vous cochez la case `Définir un ID de VLAN`{.action}, vous devrez choisir un numéro de VLAN allant de 0 à 4000. +>> +>> Si vous ne cochez pas cette case, le système attribuera un numéro de VLAN aléatoire. +>> +>> Dans le cas où vous devez faire communiquer des serveurs dédiés OVHcloud avec du VLAN taggué, consultez le guide suivant : [Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **Options de distribution des adresses DHCP** +>> +>> La plage DHCP par défaut est en 10.1.0.0/16. Vous pouvez utiliser une autre plage privée de votre choix ou désactiver le DHCP pour ce réseau privé. +>> +>> **Options de passerelle réseau** +>> +>> - **Annoncer la première adresse d'un CIDR donné comme passerelle par défaut (DHCP option 3)** : Lorsque cette option est activée, le serveur DHCP annonce la première adresse du CIDR comme passerelle par défaut aux machines connectées au réseau. +>> - **Assigner une Gateway et connectez-vous au réseau privé** : Sélectionnez cette option si vous avez l'intention de créer des instances avec un réseau privé uniquement. Pour plus d’informations, nous vous invitons à consulter les guides suivants : [Créer un réseau privé avec une Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) et [Créer une première instance Public Cloud et s’y connecter](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > Si la seconde option est grisée, cela signifie qu'elle est incompatible avec la région sélectionnée. Pour plus d’informations, veuillez vous référer à notre page sur la [disponibilité des produits Public Cloud pour chaque région](/links/public-cloud/regions-pci). +>> > +>> +>> Une fois vos choix faits, cliquez sur `Configurez votre réseau privé`{.action} pour lancer le processus. +>> +>> > [!primary] +>> > +>> > La création du réseau privé peut prendre plusieurs minutes. +>> > +>> +> Depuis les APIv6 OVHcloud +>> +>> Une fois connecté à l'[APIv6 OVHcloud](/links/api), exécutez les commandes suivantes dans l'ordre. +>> +>> **Étape 1 - Récupération des informations nécessaires :** +>> +>> **Projet Public Cloud** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet de récupérer la liste des projets. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet d'identifier le projet grâce au champ « description ». +>> > +>> +>> **vRack concerné** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Dans le champ serviceName, indiquez l'identifiant de votre projet. Conservez l'information relative à l'identifiant du vRack sous la forme « pn-xxxxx ». +>> > +>> +>> **Étape 2 - Création du réseau privé :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Renseignez les champs avec les informations précédemment obtenues : +>> > +>> > - **serviceName** : ID du projet. +>> > - **name** : le nom que vous voulez donner au VLAN. +>> > +>> > Vous pouvez laisser le champ « Region » vide pour que celui ci soit activé pour toutes les régions. +>> > +>> > L’identifiant du VLAN (vlanId) est nécessaire si vous souhaitez créer un VLAN spécifique. +>> > +>> +>> La création prend quelques instants. +>> +>> Pour vérifier les informations de vos VLAN, vous pouvez utiliser l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet de récupérer le networkId. Celui ci se présentera sous la forme suivante : nom-vrack_vlanId. +>> > +>> > Par exemple, pour le VLAN 42 : pn-xxxxxx_42. +>> > +>> +>> **Étape 3 - Création du sous-réseau :** +>> +>> Par défaut, si vous ne n'ajoutez pas de sous réseau, la plage IP utilisée est la suivante : +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> Si vous souhaitez gérer vous même les affectations IP, vous devrez créer un sous-réseau. +>> +>> Pour cela, une fois le VLAN créé, vous devrez créer le sous-réseau pour chaque zone concernée via l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Vous pouvez remplir les champs comme cela : +>> +>> |Champ|Description| +>> |---|---| +>> |serviceName|Identifiant de votre projet.| +>> |networkId|Identifiant de votre réseau récupéré lors des commandes précédentes. Par exemple : pn-xxxxxx_42 pour le VLAN 42.| +>> |dhcp|Case cochée pour activation / décochée pour désactivation du DHCP dans le VLAN.| +>> |end|Dernière adresse du sous réseau de la région. Par exemple : 192.168.1.50.| +>> |network|Bloc IP du sous réseau. Par exemple : 192.168.1.0/24.| +>> |region|Exemple : SBG3.| +>> |start|Première adresse du sous réseau pour cette région Par exemple : 192.168.1.15.| +>> +>> > [!primary] +>> > +>> > C’est l’étape de création du sous-réseau par région. Vous pouvez activer ou non l’attribution d’adresses IP privées de manière dynamique via DHCP. +>> > +>> > Vous devrez effectuer la même opération pour chaque zone où vos instances sont présentes. +>> > +>> +>> > [!warning] +>> > +>> > Faites attention à bien séparer vos pools d’adresses IP pour les différentes régions. Par exemple : +>> > +>> > - De 192.168.0.2 à 192.168.0.254 pour SBG1. +>> > - De 192.168.1.2 à 192.168.1.254 pour GRA1. +>> > +>> +> Depuis Terraform +>> +>> Dans Terraform, il faut utiliser le provider OpenStack. Vous pouvez télécharger un exemple de script terraform complet dans [ce dépôt GitHub](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> La partie spécifique à OVHcloud pour l'intégration vRack est le paramètre `value_specs`. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Depuis la CLI OpenStack +>> Dans l'exemple suivant, nous spécifions le `VLAN_ID` auquel nous voulons que le réseau fasse partie via `--provider-network-type` et `--provider-segment`. +>> +>> Vous pouvez supprimer ces paramètres. Dans ce cas, un `VLAN_ID` disponible sera utilisé. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Étape 3 : Intégrer une instance dans le vRack @@ -232,105 +573,620 @@ Deux situations peuvent se présenter à vous : - L'instance n'existe pas encore. - L'instance existe déjà et vous devez l'ajouter au vRack. -**Cas d'une nouvelle instance** - -#### Depuis l'espace client OVHcloud - -Consultez le guide [Créer une instance depuis l’espace client](/pages/public_cloud/compute/public-cloud-first-steps). Lors de la création d'une instance, vous pouvez choisir, à l'étape 5, un mode réseau, puis un réseau privé dans lequel intégrer votre instance. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> Lors de la création d'une nouvelle instance, vous ne pourrez raccorder votre instance qu'à un seul vRack depuis l'espace client OVHcloud. -> Pour ajouter plusieurs interfaces différentes, vous devrez passer par les API OpenStack ou Horizon. -> - -#### Depuis les APIv6 OVHcloud - -Cliquez [ici](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#etape-4-integrer-une-instance-dans-le-vrack) pour consulter le guide spécifique à cette méthode. - -**Cas d'une instance déjà existante** - -L'espace client OVHcloud permet d'attacher une instance à un ou plusieurs réseaux privés mais n'offre pas de configuration avancée des interfaces réseaux. Si vous souhaitez personnaliser davantage celles-ci, il vous faudra les gérer soit depuis les APIv6 OVHcloud, soit via les API OpenStack ou via Horizon. +/// details | **Cas d'une nouvelle instance** + +> [!tabs] +> Depuis l'espace client OVHcloud +>> Consultez le guide « [Créer une instance depuis l’espace client](/pages/public_cloud/compute/public-cloud-first-steps) ». Lors de la création d'une instance, vous pouvez choisir à l'étape 5, un mode réseau puis un réseau privé dans lequel intégrer votre instance. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > Lors de la création d'une nouvelle instance, vous ne pourrez raccorder votre instance qu'à **un seul** vRack depuis l'espace client OVHcloud. +>> > +>> > Pour ajouter plusieurs interfaces différentes, vous devrez passer par les API OpenStack ou Horizon. +>> > +>> +> Depuis les APIv6 OVHcloud +>> Une fois connecté à l'[APIv6 OVHcloud](/links/api), exécutez les commandes suivantes dans l'ordre. +>> +>> **Étape 1 - Récupération des informations nécessaires** +>> +>> **Récupération de l'identifiant du projet :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Récupération du networkID du réseau public (EXT-NET)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Récupération du networkID du réseau privé (interface vRack créée précédemment)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > L'identifiant alors obtenu a la forme : « pn-xxxxx_yy » où yy est le numéro du VLAN. +>> > +>> +>> **Récupération de l'identifiant du type d'instance choisi (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > Vous pouvez limiter la liste en indiquant la zone de création de votre instance. +>> > +>> +>> **Récupération de l'identifiant de l'image choisie (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > Vous pouvez limiter la liste en indiquant la zone de création de votre instance. +>> > +>> +>> **Récupération de l'identifiant de votre clé SSH OpenStack (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> Si vous n'avez pas encore ajouté de clé SSH à votre espace client, vous pourrez le faire au travers de la fonction API suivante : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> **Étape 2 - Déploiement de l'instance** +>> +>> Une fois l'ensemble des éléments nécessaires au déploiement rassemblés, vous pouvez utiliser l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> Vous devrez renseigner a minima les champs suivants : +>> +>> |Champ|Description| +>> |---|---| +>> |serviceName|Identifiant du projet Public Cloud concerné.| +>> |flavorId|Identifiant du type d'instance (par exemple : D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|Identifiant du l'image de déploiement (par exemple : Debian 9, Centos 7, etc.).| +>> |name|Nom que vous donnez à votre instance.| +>> |networks|Dans la partie « networkId », indiquez l'identifiant du réseau public (ext-net) ou celui de votre VLAN (pn-xxxxxx_yy). Vous pouvez cliquer sur le bouton « + » pour ajouter d'autres réseaux.| +>> |region|Régions de déploiement de l'instance (par exemple : GRA5).| +>> |sshKeyId|Identifiant de votre clé SSH OpenStack.| +>> +>> Une fois l'appel effectué, si toutes les informations sont correctement renseignées, l'instance va se créer avec une ou plusieurs interfaces réseau. +>> +>> > [!warning] +>> > +>> > Selon les systèmes d'exploitation, vous devrez configurer manuellement vos interfaces réseau privées pour que la prise en compte se fasse.
+>> > OpenStack n'étant pas en mesure de prioriser l'interface publique de l'interface vRack, il peut arriver que cette dernière passe en tant que route par défaut.
+>> > La conséquence directe est que l'instance est injoignable depuis une IP publique.
+>> > Un ou plusieurs redémarrages de l'instance depuis l'espace client peut permettre de rétablir la situation.
+>> > L'autre solution consiste à vous connecter à l'instance en SSH au travers d'un autre de vos serveurs présents dans le même réseau privé. Vous pouvez aussi corriger la configuration réseau de l'instance au travers du mode Rescue. +>> > +>> +> Depuis la CLI OpenStack +>> **Récupération des informations nécessaires** +>> +>> Identification des réseaux publics et privés : +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MonVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MonVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MonVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MonVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Vous devrez noter les ID des réseaux vous intéressant : +>> > +>> > - Ext-Net pour avoir une IP publique. +>> > - Celui du ou des VLAN nécessaires à votre configuration. +>> > +>> +>> Pensez également à noter les informations suivantes, comme indiqué dans le [guide d'utilisation de l'API Nova](/pages/public_cloud/compute/starting_with_nova) : +>> +>> - ID ou nom de la clé SSH OpenStack. +>> - ID du type d'instance (flavor). +>> - ID de l'image souhaitée (Système d'exploitation, snapshot, etc.). +>> +>> **Déploiement de l'instance** +>> +>> Avec les éléments récupérés précédemment, il est possible de créer une instance en l'incluant directement dans le vRack : +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Par exemple : +>> +>> ```bash +>> nova boot --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nom de la clé] | +>> | metadata | {} | +>> | name | [nom de votre instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Par exemple : +>> +>> ```bash +>> openstack server create --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nom de la clé] | +>> | metadata | {} | +>> | name | [nom de votre instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> Vous avez la possibilité de définir l'adresse IP de l'instance de votre interface vRack au niveau d'OpenStack. +>> +>> Pour cela, vous pouvez ajouter un simple argument dans la fonction « --nic » : +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Par exemple : +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Vérification de l'instance** +>> +>> Après quelques instants, on peut vérifier la liste des instances existantes afin de retrouver le serveur créé : +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Nom de l'instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | [Nom-de-l'instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Nom-de-l'instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **Cas d'une instance déjà existante** + +L'espace client OVHcloud permet d'attacher une instance à un ou plusieurs réseaux privés mais n'offre pas de configuration avancée des interfaces réseau. Si vous souhaitez personnaliser davantage celles-ci, il vous faudra les gérer soit depuis les APIv6 OVHcloud, soit via les API OpenStack ou via Horizon. L'action consistera alors à simplement ajouter une nouvelle interface réseau à votre serveur, en plus de celle existante. Ainsi, par exemple, si vous avez une interface publique *eth0*, vous aurez en plus une interface *eth1*. > [!warning] -> La configuration de cette nouvelle interface est rarement automatique. -> Il vous faudra donc la configurer en DHCP ou IP Fixe selon votre infrastructure. +> La configuration de cette nouvelle interface est rarement automatique. Il vous faudra donc la configurer en DHCP ou en IP fixe selon votre infrastructure. > -#### Depuis l'espace client OVHcloud - -Connectez-vous à votre [espace client OVHcloud](/links/manager), accédez à la section `Public Cloud`{.action} et sélectionnez ensuite le projet Public Cloud concerné en haut à gauche. - -Cliquez alors sur `Instances`{.action} dans le menu latéral de gauche. Cliquez ensuite sur le bouton `...`{.action} à droite de l'instance concernée puis sur `Détail de l'instance`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -Le tableau de bord de votre instance vous est alors présenté. Cliquez sur le bouton `...`{.action} à droite de « Réseau(x) privé(s) » puis sur `Attacher un réseau`{.action}. - -![attacher réseau](images/vrack2021-01.png){.thumbnail} - -Dans la pop-up qui apparaît, sélectionnez le ou les réseaux privés à attacher à votre instance puis cliquez sur `Attacher`{.action}. - -![attacher réseau](images/vrack9.png){.thumbnail} +> [!tabs] +> Depuis l'espace client OVHcloud +>> Connectez-vous à votre [espace client OVHcloud](/links/manager), accédez à la section `Public Cloud`{.action} et sélectionnez le projet Public Cloud concerné en haut à gauche. +>> +>> Cliquez alors sur `Instances`{.action} dans le menu latéral de gauche. Cliquez ensuite sur le bouton `⁝`{.action} à droite de l'instance concernée puis sur `Détail de l'instance`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> Le tableau de bord de votre instance vous est alors présenté. Cliquez sur le bouton `⁝`{.action} à droite de « Réseaux privés » puis sur `Attacher un réseau`{.action}. +>> +>> ![attacher réseau](images/vrack2021-01.png){.thumbnail} +>> +>> Dans la pop-up qui apparaît, sélectionnez le ou les réseaux privés à attacher à votre instance puis cliquez sur `Confirmer`{.action}. +>> +>> ![attacher réseau](images/vrack9.png){.thumbnail} +>> +> Depuis les APIv6 OVHcloud +>> L'action consistera simplement à ajouter une nouvelle interface réseau à votre serveur, en plus de celle existante. +>> +>> Ainsi, par exemple, si le serveur dispose d’une interface publique eth0, une interface supplémentaire eth1 sera ajoutée. +>> +>> > [!primary] +>> > +>> > La configuration de cette nouvelle interface est rarement automatique.
+>> > Il vous faudra donc la configurer en DHCP ou en IP fixe selon votre infrastructure. +>> > +>> +>> **Les étapes ci-dessous décrivent comment effectuer la gestion des interfaces réseau de vos instances.** +>> +>> **Étape 1 - Récupération des informations nécessaires** +>> +>> **Récupération de l'identifiant du projet :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Récupération de l'identifiant de l'instance :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Récupération du networkID du réseau public (EXT-NET) :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Récupération du networkID du réseau privé (interface vRack créée précédemment) :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > L'identifiant alors obtenu a la forme : « pn-xxxxx_yy » où yy est le numéro du VLAN. +>> > +>> +>> **Étape 2 - Ajout d'une interface à votre instance** +>> +>> Une fois l'ensemble des informations nécessaires récupérées, vous pouvez utiliser l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> Vous devrez renseigner a minima les champs suivants : +>> +>> |Champ|Description| +>> |---|---| +>> |serviceName|Identifiant du projet Public Cloud concerné.| +>> |instanceId|Identifiant de l'instance concernée.| +>> |networkId|Indiquez l'identifiant du réseau public (ext-net) ou celui de votre VLAN (pn-xxxxxx_yy).| +>> |ip|Définir une IP spécifique (fonctionne uniquement pour les interfaces privées).| +>> +>> Une fois l'appel effectué, si toutes les informations sont correctement renseignées, une nouvelle interface va s'ajouter sur votre instance. +>> +>> > [!primary] +>> > +>> > Votre instance OVHcloud disposera donc d'une nouvelle interface réseau en plus de l'interface publique (Ext-net).
+>> > Vous pourrez voir, dans le résumé de l'instance, l'adresse IP privée attribuée automatiquement à votre interface.
+>> > À votre charge de l'utiliser en configurant votre interface via le DHCP ou en utilisant vos propres adresses IP au travers d'une configuration en IP statique. +>> > +>> +>> **Étape 3 - Détacher une interface de votre instance** +>> +>> > [!warning] +>> > +>> > Détacher une interface réseau entraîne sa suppression immédiate. +>> > +>> > Cependant, il est important de noter que si vous détachez l'interface « Ext-Net » (IP publique), cette adresse serait relâchée et remise en circulation. Vous ne pourriez donc pas vous la réattribuer.
+>> > Cette action n'est à effectuer que si vous souhaitez isoler votre serveur dans le vRack (réseau privé) ou, à l’inverse, le retirer d’un ou de plusieurs VLAN. +>> > +>> +>> Une fois l'ensemble des informations nécessaires récupérées, vous pouvez utiliser l'appel suivant pour supprimer une interface : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> Vous devrez renseigner a minima les champs suivants : +>> +>> |Champ|Description| +>> |---|---| +>> |serviceName|Identifiant du projet Public Cloud concerné.| +>> |instanceId|Identifiant de l'instance concernée.| +>> |networkId|Indiquez l'identifiant du réseau public (ext-net) ou celui de votre VLAN (pn-xxxxxx_yy).| +>> +> Depuis OpenStack Horizon +>> Connectez-vous à l'interface [Horizon](https://horizon.cloud.ovh.net/auth/login/) en suivant la méthode indiquée dans la [première partie de ce guide](#horizon). +>> +>> Connectez-vous sur votre zone de travail : +>> +>> ![connexion Horizon](images/horizon1.png){.thumbnail} +>> +>> Dirigez-vous ensuite dans `Compute`, puis `Instances` : +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Ajout d'une interface réseau privée** +>> +>> Pour ajouter une interface, dans la colonne `Actions`, cliquez sur la flèche permettant d'accéder aux actions possible sur l'instance. Cliquez alors sur `Attach Interface`{.action} : +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Sélectionnez votre interface et validez : +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Votre instance OVHcloud disposera donc d'une nouvelle interface réseau en plus de l'interface publique (Ext-net).
+>> > Vous pourrez voir, dans le résumé de l'instance, l'adresse IP privée attribuée automatiquement à votre interface.
+>> > À votre charge de l'utiliser en configurant votre interface via le DHCP ou en utilisant vos propres adresses IP au travers d'une configuration en IP statique. +>> > +>> +>> **Détacher une interface réseau** +>> +>> > [!warning] +>> > +>> > Détacher une interface réseau entraîne sa suppression immédiate. +>> > +>> > Cependant, il est important de noter que si vous détachez l'interface « Ext-Net » (IP publique), cette adresse serait relâchée et remise en circulation. Vous ne pourriez donc pas vous la réattribuer.
+>> > Cette action n'est à effectuer que si vous souhaitez isoler votre serveur dans le vRack (réseau privé) ou, à l’inverse, le retirer d’un ou de plusieurs VLAN. +>> > +>> +>> Pour détacher une interface réseau privée, dans la colonne `Actions`, cliquez sur la flèche permettant d'accéder aux actions possible sur l'instance. Cliquez alors sur `Detach Interface`{.action} : +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Sélectionnez l'interface à supprimer et validez : +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Depuis la CLI OpenStack +>> **Récupération des informations nécessaires** +>> +>> Identification de vos instances : +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Mon-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MonVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Mon-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MonVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Identification des réseaux publics et privés : +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MonVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MonVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MonVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MonVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Vous devrez noter les ID des réseaux vous intéressant : +>> > +>> > - Ext-Net pour avoir une IP publique. +>> > - Celui du ou des VLAN nécessaires à votre configuration. +>> > +>> +>> **Ajout d'une interface réseau privée** +>> +>> Afin d'attacher une nouvelle interface, vous pouvez effectuer la commande suivante : +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Par exemple : +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> Vous pouvez vérifier que l'action à bien été prise en compte : +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => votre IP publique +>> | MonVLAN-42 network | 192.168.0.x | => votre IP privée +>> [...] +>> ``` +>> +>> ou +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MonVLAN-42=192.168.0.x | => votre IP publique ; votre IP privée +>> [...] +>> ``` +>> + +### Détacher une interface réseau -#### Gestion des interfaces réseaux depuis les APIv6 OVHcloud - -Cliquez [ici](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#cas-dune-instance-deja-existante) pour consulter le guide spécifique à cette méthode. - -#### Gestion des interfaces réseaux depuis OpenStack Horizon - -Connectez-vous à l'interface [Horizon](https://horizon.cloud.ovh.net/auth/login/) en suivant la méthode indiquée dans la [première partie de ce guide](./#interface-horizon). - -Connectez-vous bien sur votre zone de travail : - -![connexion Horizon](images/horizon1.png){.thumbnail} - -Dirigez-vous ensuite dans `Compute`, puis `Instances` : - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Ajout d'une interface réseau privée** - -Pour ajouter une interface, dans la colonne « Actions », cliquez sur la flèche permettant d'accéder aux actions possible sur l'instance. Cliquez alors sur `Attach Interface`{.action} : - -![Horizon attach interface](images/horizon3.png){.thumbnail} +> [!warning] +> Détacher une interface réseau entraîne sa suppression immédiate. +> +> Cependant, il est important de noter que si vous détachez l'interface « Ext-Net » (IP publique), cette adresse serait relâchée et remise en circulation. Vous ne pourriez donc pas vous la réattribuer.
+> Cette action n'est à effectuer que si vous souhaitez isoler votre serveur dans le vRack (réseau privé) ou, à l’inverse, le retirer d’un ou de plusieurs VLAN. +> -Sélectionnez votre interface et validez : +Pour détacher une interface réseau, vous aurez besoin dans un premier temps d'identifier le port Neutron qui aura été créé. -![Horizon attach interface](images/horizon4.png){.thumbnail} +Pour cela, vous pouvez utiliser les commandes suivantes : -> [!primary] -> Votre instance OVHcloud disposera donc d'une nouvelle interface réseau en plus de l'interface publique (Ext-net). ->
Vous pourrez voir, dans le résumé de l'instance, l'adresse IP privée attribuée automatiquement à votre interface. ->
À votre charge de l'utiliser en configurant votre interface via le DHCP ou en utilisant vos propres IP au travers d'une configuration en IP statique. -> +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` -**Détacher une interface réseau** +ou + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -> [!warning] -> Détacher une interface réseau entraîne sa suppression immédiate. -> -> Cependant, il est important de noter que si vous detacher l'interface « Ext-Net » (IP publique), cette adresse serait relâchée et remise en circulation. Vous ne pourriez donc pas vous la réattribuer. ->
Cette action n'est à effectuer que si vous souhaitez isoler votre serveur dans le vRack (réseau privée) ou dans le cas contraire la sortir d'un ou plusieurs VLAN. -> +Une fois le port à supprimer identifié, vous pouvez effectuer la commande suivante : -Pour détacher une interface réseau privée, dans la colonne « Actions », cliquez sur la flèche permettant d'accéder aux actions possible sur l'instance. Cliquez alors sur `Detach Interface`{.action} : +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Par exemple : -Sélectionnez l'interface à supprimer et validez : +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +/// ## Aller plus loin -[Configuration du vRack Public Cloud depuis les APIv6 OVHcloud](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) - [Serveurs Dédiés - Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) Si vous avez besoin d'une formation ou d'une assistance technique pour la mise en oeuvre de nos solutions, contactez votre commercial ou cliquez sur [ce lien](/links/professional-services) pour obtenir un devis et demander une analyse personnalisée de votre projet à nos experts de l’équipe Professional Services. diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.fr-fr.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.fr-fr.md index c51e3816150..abe08fe9b96 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.fr-fr.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.fr-fr.md @@ -1,9 +1,23 @@ --- title: 'Configuration du vRack Public Cloud' excerpt: 'Découvrez comment configurer un vRack Public Cloud' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objectif Le [vRack](/links/network/vrack) est un réseau privé qui vous permet de configurer l’adressage entre plusieurs serveurs dédiés OVHcloud. Mais il vous permet également d’ajouter des [instances Public Cloud](/links/public-cloud/compute) à votre réseau privé afin de créer une infrastructure de ressources physiques et virtuelles. @@ -25,27 +39,33 @@ Selon votre profil technique et vos besoins, vous serez amenés à devoir choisi **Voici un descriptif rapide des actions possibles suivant la méthode/interface choisie :** -### Espace client OVHcloud +/// details | Espace client OVHcloud -[L'espace client OVHcloud](/links/manager) est une interface entièrement et uniquement visuelle, ce qui en fait une interface idéale à la gestion de plusieurs VLAN. Vous aurez également la possibilité de personnaliser la plage d'IP privée qui, par défaut, est 10.x.x.x/16. +[L'espace client OVHcloud](/links/manager) est une interface entièrement et uniquement visuelle, ce qui en fait une interface idéale à la gestion de plusieurs VLAN. Vous aurez également la possibilité de personnaliser la plage d'IP privée qui, par défaut, est 10.1.0.0/16. Les VLAN seront déployés dans la Région sélectionnée. Vous aurez également la possibilité d'activer ou non les passerelles, d'activer les distributions DHCP, etc. Vous pourrez également gérer la facturation de vos services au travers de votre espace client OVHcloud. -### Interface Horizon +/// + + + +/// details | Interface Horizon Interface visuelle indépendante d'OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) est l'implémentation d’origine du tableau de bord d'OpenStack, qui fournit une interface utilisateur web aux services OpenStack, notamment Nova, Swift, Keystone, etc. Cette interface complète et technique vous permet de gérer la quasi totalité des actions OpenStack. Ce sera une des interfaces nécessaires si vous souhaitez gérer plus de deux VLAN, ajouter des interfaces réseau privées à vos instances, gérer des images personnalisées, etc. -Consultez le guide [Accéder à l'interface Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) pour vous familiariser à Horizon. +Consultez le guide « [Présentation de Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) » pour vous familiariser à Horizon. > [!primary] > Horizon fonctionnant par zone, pensez bien à choisir votre zone géographique de travail tout en haut à gauche de votre interface (GRA5, SBG3, BHS1, etc.) > -### APIv6 OVHcloud +/// + +/// details | APIv6 OVHcloud Chaque action que vous effectuez dans l'espace client OVHcloud fait appel aux [APIv6 OVHcloud](/links/api). Vous pouvez même aller plus loin dans les API que dans votre espace client. @@ -58,19 +78,21 @@ Vous pouvez simplement accéder aux API depuis [notre page web](/links/api), mai Ainsi, il vous sera possible de librement automatiser les tâches de base au moyen de scripts, optimiser vos propres fonctions, etc. -Consultez le guide [Premiers pas avec les API OVHcloud](/pages/manage_and_operate/api/first-steps) pour vous familiariser avec l'utilisation des APIv6 OVHcloud. +Consultez le guide « [Premiers pas avec les API OVHcloud](/pages/manage_and_operate/api/first-steps) » pour vous familiariser avec l'utilisation des APIv6 OVHcloud. -### API OpenStack +/// + +/// details | API OpenStack Il est possible d’administrer les services Public Cloud à l’aide de lignes de commandes Linux ou Windows, après le téléchargement et l’installation des outils OpenStack. Cette méthode demande de bonnes connaissances Linux ou Windows pour en profiter, mais elle permet de profiter de toute la puissance d'OpenStack par ce biais. -Suivant la couche que vous souhaitez gérer, vous devrez utilisez le client Nova (Compute), Neutron (réseau), Glance (Image) ou encore Swift (Object Storage). Le dernier né de la famille, le client OpenStack, vous permet de gérer directement la quasi intégralité des couches OpenStack. +Suivant la couche que vous souhaitez gérer, vous devrez utiliser le client Nova (Compute), Neutron (réseau), Glance (image) ou encore Swift (Object Storage). Le dernier né de la famille, le client OpenStack, vous permet de gérer directement la quasi intégralité des couches OpenStack. Grâce à l’API OpenStack, vous pouvez aussi facilement automatiser cette gestion au travers de vos scripts. -Afin de vous familariser avec l'API OpenStack, consultez tout d'abord les guides suivants : +Afin de vous familiariser avec l'API OpenStack, consultez tout d'abord les guides suivants : - [Préparer l’environnement pour utiliser l’API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) - [Charger les variables d’environnement OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) @@ -90,45 +112,235 @@ Vous pourrez alors, suivant votre besoin, utiliser les API dédiées à OpenStac > Vous pouvez consulter à tout moment la [documentation officielle d'OpenStack](https://docs.openstack.org/fr/) si vous souhaitez aller plus loin dans leur utilisation. > -Pour plus d'informations, consultez ce guide : [Configuration du vRack Public Cloud l'aide de l'OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | CLI OpenStack -Terraform permet aussi de gérer les infrastructures d’OVHcloud. +Vous pouvez gérer vos services Public Cloud et votre vRack OVHcloud directement depuis votre terminal Linux ou Windows grâce à la CLI OpenStack. -Pour cela, vous devez choisir le bon fournisseur et la bonne ressource Terraform. Retrouvez plus d’informations dans notre [guide d’utilisation de Terraform](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +Cette interface permet de gérer toutes les couches OpenStack : -## En pratique +- Nova : instances (compute) +- Neutron : réseaux +- Glance : images +- Cinder : volumes -### Étape 1 : Activer et gérer un vRack +La CLI centralise ces fonctionnalités et peut être intégrée à vos scripts pour automatiser vos tâches. -#### Depuis l'espace client OVHcloud +Avant de commencer, consultez les guides suivants : + +- [Préparer l’environnement pour utiliser l’API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Charger les variables d’environnement OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> Ceci ne s'applique pas aux projets nouvellement créés qui sont désormais automatiquement livrés avec un vRack. Pour visualiser le vRack une fois le projet créé, rendez-vous dans le section `Network`{.action} dans l’onglet de gauche. Cliquez sur `Réseau Privé vRack`{.action} pour voir le(s) vRack(s). +> +> La CLI OpenStack est pratique pour gérer votre vRack, cependant certaines fonctions peuvent différer selon la version du client ou du système d’exploitation. Consultez la [documentation officielle d'OpenStack](https://docs.openstack.org/fr/). > -Si vous avez un projet plus ancien et que vous n'avez pas de vRack, vous devez en commander un. Ce produit est gratuit et la mise à disposition ne prend que quelques minutes. - -Dans le menu situé à gauche de l'écran, cliquez sur le bouton `Ajouter un service`{.action} (icône de panier d'achat). Utilisez le filtre en haut de la page ou faites défiler vers le bas pour trouver le service `vRack`{.action}. - -![Commander le vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -Vous serez redirigé vers une autre page pour valider la commande, l'opération prendra quelques minutes. +/// details | Terraform -Une fois le service actif, vous le retrouverez dans votre espace client dans la section `Network`{.action} > `Réseau Privé vRack`{.action}. Sous l’appellation « pn-xxxxxx ». +Terraform permet aussi de gérer les infrastructures d’OVHcloud. -Dans la liste des services éligibles, sélectionnez le projet que vous souhaitez ajouter au vRack et cliquez sur le bouton `Ajouter`{.action}. +Pour cela, vous devez choisir le bon fournisseur et la bonne ressource Terraform. Retrouvez plus d’informations dans notre [guide d’utilisation de Terraform](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![ajouter le projet](images/addprojectvrack.png){.thumbnail} +/// -Pour continuer la configuration du vRack depuis l'espace client OVHcloud, poursuivez la lecture de ce guide à partir de [Créer un réseau privé depuis l'espace client OVHcloud](./#creer-un-reseau-prive-depuis-lespace-client-ovhcloud). +## En pratique -#### Depuis les APIv6 OVHcloud +### Étape 1 : Activer et gérer un vRack -Pour activer et gérer un vRack depuis les APIv6 OVHcloud, cliquez [ici](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#etape-1-activer-et-gerer-un-vrack) pour consulter le guide spécifique à cette méthode. +> [!warning] +> +> Le vRack est géré au niveau de l’infrastructure OVHcloud, ce qui signifie que vous ne pouvez l’administrer que depuis votre espace client et les APIv6 OVHcloud. +> -### Étape 2 : Créer un réseau privé dans le vRack +> [!tabs] +> Depuis l'espace client OVHcloud +>> > [!primary] +>> > +>> > Cette étape ne s'applique pas aux projets nouvellement créés, qui sont désormais automatiquement livrés avec un vRack. Pour visualiser le vRack une fois le projet créé, rendez-vous dans la section `Network`{.action} et cliquez sur `Réseau Privé vRack`{.action} pour voir le(s) vRack(s). +>> > +>> +>> Si vous avez un projet plus ancien et que vous n'avez pas de vRack, vous devez en commander un. Ce produit est gratuit et la mise à disposition ne prend que quelques minutes. +>> +>> Dans le menu situé à gauche de l'écran, cliquez sur le bouton `Ajouter un service`{.action} (icône de panier d'achat). Utilisez le filtre en haut de la page ou faites défiler vers le bas pour trouver le service `vRack`{.action}. +>> +>> ![Commander le vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> Vous serez redirigé vers une autre page pour valider la commande, l'opération prendra quelques minutes. +>> +>> Une fois le service actif, vous le retrouverez dans votre espace client dans la section `Network`{.action} > `Réseau Privé vRack`{.action}, sous l’appellation « pn-xxxxxx ». +>> +>> Cliquez sur votre vRack, sélectionnez le projet que vous souhaitez y ajouter dans la liste des services éligibles puis cliquez sur le bouton `Ajouter`{.action}. +>> +>> ![ajouter le projet](images/addprojectvrack.png){.thumbnail} +>> +>> Pour continuer la configuration du vRack depuis l'espace client OVHcloud, poursuivez la lecture de ce guide à partir de l'[étape 2 : Créer un réseau privé dans le vRack](#create-pn-in-vrack), onglet **Depuis l'espace client OVHcloud**. +>> +> Depuis les APIv6 OVHcloud +>> +>> **Étape 1 : Activer et gérer un vRack** +>> +>> Connectez-vous aux APIv6 OVHcloud en suivant le guide « [Premiers pas avec les API OVHcloud](/pages/manage_and_operate/api/first-steps) ». +>> +>> Une fois authentifié, suivez les étapes décrites ci-dessous : +>> +>> **Création du panier** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > Cet appel va créer un identifiant pour votre « panier ». Vous pourrez y ajouter autant d'articles que vous voulez avant de le valider. +>> > +>> > Dans le cas présent, la commande d’un vRack est gratuite. Récupérez le numéro de votre panier (cartId), il sera indispensable pour la suite. +>> > +>> +>> **Récupération des informations nécessaires à la commande du vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Cet appel va vous permettre de récupérer l'ensemble des informations nécessaires à la commande du vRack. Copiez les éléments suivants : +>> > +>> > *cartId*, *duration*, *planCode*, et *pricingMode*. +>> > +>> +>> **Ajout du vRack dans le panier** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Cet appel va vous permettre d'ajouter le vRack au panier en ajoutant l’ensemble des informations nécessaires à la commande. +>> > +>> > Dans le cas du vRack, cela donnerait par exemple : +>> > +>> > cartId : [identifiant de votre panier] +>> > +>> > duration : « P1M » +>> > +>> > planCode : « vrack » +>> > +>> > pricingMode : « default » +>> > +>> > quantity : 1 +>> > +>> +>> Une fois que vous aurez validé la commande, vous obtiendrez un numéro d'article (« itemId »). Conservez cette information, elle vous sera utile si vous souhaitez apporter des modifications avant la validation du panier. +>> +>> **Validation du panier** +>> +>> Une fois l'ensemble des articles mis dans votre panier, vous devrez le valider : +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > Cet appel va valider le panier et vous créer un bon de commande (orderId). Conservez cette information, elle sera nécessaire à la validation de la commande. +>> > +>> +>> **Validation de la commande finale** +>> +>> Pour valider la commande, vous avez deux méthodes possibles : +>> +>> - Passer par l'URL visible lorsque le panier est validé. +>> Exemple d'URL : https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Valider par l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Même s’il s’agit d’un bon de commande à 0 €, il est nécessaire de simuler un paiement du bon de commande (orderId). Votre bon de commande sera alors validé et son traitement commencera. +>> > +>> +>> Une fois le bon de commande gratuit validé, un délai de quelques minutes peut être nécessaire pour que le vRack soit actif. +>> +>> **Étape 2 : Ajouter votre projet Public Cloud dans le vRack** +>> +>> Une fois le vRack actif, il vous faudra intégrer votre ou vos projets Public Cloud dans le vRack. +>> +>> Connectez-vous aux APIv6 OVHcloud en suivant le guide « [Premiers pas avec les API OVHcloud](/pages/manage_and_operate/api/first-steps) ». +>> +>> Dans le cas ou l’identifiant du projet Public Cloud n’est pas connu, les appels suivants vous permettront de le retrouver. +>> +>> **Identification du projet** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet de récupérer la liste des projets. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet d'identifier le projet grâce au champ « description ». +>> > +>> +>> **Ajout du projet dans le vRack** +>> +>> Une fois l’identifiant du projet et le nom du vRack connus, leur association se fait via l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Renseignez les champs de l'appel avec les informations relevées précédemment : +>> +>> - **serviceName** : nom du vRack sous la forme « pn-xxxxxx ». +>> - **project** : identifiant du projet Public Cloud, sous la forme d’une chaîne de 32 caractères. +>> +>> > [!primary] +>> > +>> > Cet appel initialise l’association du projet au vRack, il faut ensuite récupérer l’identifiant de la tâche pour vérifier son avancement. +>> > +>> +>> **Vérification de l'avancement de la tâche d'ajout** +>> +>> Vous pouvez consulter l'évolution de l'ajout du projet dans le vRack grâce à cet appel : +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > Cet appel est facultatif et permet juste de vérifier le statut de la tâche. Une fois celle-ci terminée, vous pouvez passer à l’étape suivante. +>> > +>> + +### Étape 2 : Créer un réseau privé dans le vRack Il est nécessaire de créer un réseau privé avec un réseau local virtuel (VLAN) afin que les instances reliées au vRack puissent communiquer entre elles. @@ -137,93 +349,222 @@ Ainsi, par exemple, l'IP 192.168.0.10 du VLAN 2 est différente de l'IP 192.168. Cela peut vous être utile afin de segmenter votre vRack entre plusieurs réseaux virtuels. -Depuis l'espace client OVHcloud, vous pouvez attribuer le VLAN de votre choix et personnaliser la plage d'IP privées. +Depuis l'espace client OVHcloud et les APIv6 OVHcloud, vous pourrez personnaliser l'ensemble des paramètres : mode et région de déploiement, nom et ID du VLAN, plage d'adresses IP privées (10.0.0.0/16 par exemple), DHCP et Gateway. > [!primary] > Sur les serveurs dédiés, par défaut, vous êtes sur le VLAN 0. Le fonctionnement de l’infrastructure OpenStack fait que vous devrez spécifier le numéro de votre VLAN directement au niveau de l'infrastructure. > -> Contrairement aux serveurs dédiés, il n’est pas nécessaire de « tagguer » le VLAN directement sur une instance Public Cloud. +> Contrairement aux serveurs dédiés, il n’est pas nécessaire de « tagguer » le VLAN directement sur une instance Public Cloud. > -> Pour plus d'informations sur la gestion des VLAN du vRack des serveurs dédiés, vous pouvez consulter ce guide : [Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +> Pour plus d'informations sur la gestion des VLAN du vRack des serveurs dédiés, consultez ce guide : [Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). > [!warning] > Le vRack étant une infrastructure gérée au niveau d'OVHcloud, vous ne pourrez l'administrer qu'au travers de l'espace client OVHcloud et des APIv6 OVHcloud. > -> OpenStack n'étant pas située au même niveau de l'infrastructure, vous ne pourrez pas personnaliser les VLAN au travers de l'interface Horizon ou des API OpenStack. -> - -#### Créer un réseau privé depuis l'espace client OVHcloud - -Une fois votre vRack créé, l’étape suivante consiste à créer un réseau privé. - -Dans l'onglet Public cloud , cliquez sur `Private Network`{.action} dans le menu de gauche sous **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Cliquez à présent sur `Créer un réseau privé`{.action}. La page suivante vous permettra de personnaliser plusieurs paramètres. - -À l'étape 1, sélectionnez la région dans laquelle vous souhaitez créer le réseau privé. - -![select region](images/vrack5-2024.png){.thumbnail} - -À l'étape suivante, un certain nombre d'options vous sont présentées : - -![create network](images/vrack6-2022.png){.thumbnail} - -Dans le champ **Nom du réseau privé**, définissez un nom pour votre réseau privé. - -**Créez une Gateway et connectez-vous au réseau privé** - -Sélectionnez cette option si vous avez l'intention de créer des instances avec un réseau privé uniquement. Pour plus d’informations, nous vous invitons à consulter les guides suivants : [Créer un réseau privé avec une Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) et [Créer une première instance Public Cloud et s’y connecter](/pages/public_cloud/compute/public-cloud-first-steps). - -> [!warning] -> Si l'option est grisée, cela signifie qu'elle est incompatible avec la région sélectionnée. Pour plus d’informations, veuillez vous référer à notre page sur la [disponibilité des produits Public Cloud pour chaque région](/links/public-cloud/regions-pci). -> - -**Options réseau du layer 2** - -Si vous cochez la case `Définir un VLAN`, vous devrez choisir un numéro de VLAN allant de 0 à 4000. - -Si vous ne cochez pas cette case, le système attribuera un numéro de VLAN aléatoire. - -Dans le cas où vous devez faire communiquer des serveurs dédiés OVHcloud avec du VLAN taggué, consultez le guide suivant : [Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**Options de distribution des adresses DHCP** - -La plage DHCP par défaut est en 10.0.0.0/16. Vous pouvez utiliser une autre plage privée de votre choix. - -Une fois vos choix faits, cliquez sur `Créer`{.action} pour lancer le processus. - -> [!primary] -> La création du réseau privé peut prendre plusieurs minutes. +> OpenStack n'étant pas situé au même niveau de l'infrastructure, vous ne pourrez pas personnaliser les VLAN au travers de l'interface Horizon ou des API OpenStack. > -#### Créer un réseau privé depuis les APIv6 OVHcloud - -Pour créer un réseau privé depuis les APIv6 OVHcloud, cliquez [ici](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#etape-3-creer-un-vlan-dans-le-vrack) pour consulter le guide spécifique à cette méthode. - -#### Créer un réseau privé via Terraform - -Dans Terraform, il faut utiliser le provider openstack. Vous pouvez télécharger un exemple de script terraform complet dans [ce dépôt](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -La partie spécifique à OVHcloud pour l'intégration vRack est le paramètre `value_specs`. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> Depuis l'espace client OVHcloud +>> Une fois votre vRack créé, l’étape suivante consiste à créer un réseau privé. +>> +>> Dans l'onglet `Public cloud`{.action}, cliquez sur `Private Network`{.action} dans le menu de gauche sous **Network**. +>> +>> ![VLAN creation](images/vrack2022-03.png){.thumbnail} +>> +>> Cliquez à présent sur `Créer un réseau privé`{.action}. La page suivante vous permettra de personnaliser plusieurs paramètres. +>> +>> Pour commencer, sélectionnez un mode de déploiement ainsi que la région dans laquelle vous souhaitez créer le réseau privé. +>> +>> ![select region](images/vrack5-2024.png){.thumbnail} +>> +>> À l'étape suivante, un certain nombre d'options vous sont présentées : +>> +>> ![create network](images/vrack6-2022.png){.thumbnail} +>> +>> Dans le champ **Nom du réseau privé**, définissez un nom pour votre réseau privé. +>> +>> **Option réseau du layer 2** +>> +>> Si vous cochez la case `Définir un ID de VLAN`{.action}, vous devrez choisir un numéro de VLAN allant de 0 à 4000. +>> +>> Si vous ne cochez pas cette case, le système attribuera un numéro de VLAN aléatoire. +>> +>> Dans le cas où vous devez faire communiquer des serveurs dédiés OVHcloud avec du VLAN taggué, consultez le guide suivant : [Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **Options de distribution des adresses DHCP** +>> +>> La plage DHCP par défaut est en 10.1.0.0/16. Vous pouvez utiliser une autre plage privée de votre choix ou désactiver le DHCP pour ce réseau privé. +>> +>> **Options de passerelle réseau** +>> +>> - **Annoncer la première adresse d'un CIDR donné comme passerelle par défaut (DHCP option 3)** : Lorsque cette option est activée, le serveur DHCP annonce la première adresse du CIDR comme passerelle par défaut aux machines connectées au réseau. +>> - **Assigner une Gateway et connectez-vous au réseau privé** : Sélectionnez cette option si vous avez l'intention de créer des instances avec un réseau privé uniquement. Pour plus d’informations, nous vous invitons à consulter les guides suivants : [Créer un réseau privé avec une Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) et [Créer une première instance Public Cloud et s’y connecter](/pages/public_cloud/compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > Si la seconde option est grisée, cela signifie qu'elle est incompatible avec la région sélectionnée. Pour plus d’informations, veuillez vous référer à notre page sur la [disponibilité des produits Public Cloud pour chaque région](/links/public-cloud/regions-pci). +>> > +>> +>> Une fois vos choix faits, cliquez sur `Configurez votre réseau privé`{.action} pour lancer le processus. +>> +>> > [!primary] +>> > +>> > La création du réseau privé peut prendre plusieurs minutes. +>> > +>> +> Depuis les APIv6 OVHcloud +>> +>> Une fois connecté à l'[APIv6 OVHcloud](/links/api), exécutez les commandes suivantes dans l'ordre. +>> +>> **Étape 1 - Récupération des informations nécessaires :** +>> +>> **Projet Public Cloud** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet de récupérer la liste des projets. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet d'identifier le projet grâce au champ « description ». +>> > +>> +>> **vRack concerné** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Dans le champ serviceName, indiquez l'identifiant de votre projet. Conservez l'information relative à l'identifiant du vRack sous la forme « pn-xxxxx ». +>> > +>> +>> **Étape 2 - Création du réseau privé :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Renseignez les champs avec les informations précédemment obtenues : +>> > +>> > - **serviceName** : ID du projet. +>> > - **name** : le nom que vous voulez donner au VLAN. +>> > +>> > Vous pouvez laisser le champ « Region » vide pour que celui ci soit activé pour toutes les régions. +>> > +>> > L’identifiant du VLAN (vlanId) est nécessaire si vous souhaitez créer un VLAN spécifique. +>> > +>> +>> La création prend quelques instants. +>> +>> Pour vérifier les informations de vos VLAN, vous pouvez utiliser l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Cet appel permet de récupérer le networkId. Celui ci se présentera sous la forme suivante : nom-vrack_vlanId. +>> > +>> > Par exemple, pour le VLAN 42 : pn-xxxxxx_42. +>> > +>> +>> **Étape 3 - Création du sous-réseau :** +>> +>> Par défaut, si vous ne n'ajoutez pas de sous réseau, la plage IP utilisée est la suivante : +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> Si vous souhaitez gérer vous même les affectations IP, vous devrez créer un sous-réseau. +>> +>> Pour cela, une fois le VLAN créé, vous devrez créer le sous-réseau pour chaque zone concernée via l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Vous pouvez remplir les champs comme cela : +>> +>> |Champ|Description| +>> |---|---| +>> |serviceName|Identifiant de votre projet.| +>> |networkId|Identifiant de votre réseau récupéré lors des commandes précédentes. Par exemple : pn-xxxxxx_42 pour le VLAN 42.| +>> |dhcp|Case cochée pour activation / décochée pour désactivation du DHCP dans le VLAN.| +>> |end|Dernière adresse du sous réseau de la région. Par exemple : 192.168.1.50.| +>> |network|Bloc IP du sous réseau. Par exemple : 192.168.1.0/24.| +>> |region|Exemple : SBG3.| +>> |start|Première adresse du sous réseau pour cette région Par exemple : 192.168.1.15.| +>> +>> > [!primary] +>> > +>> > C’est l’étape de création du sous-réseau par région. Vous pouvez activer ou non l’attribution d’adresses IP privées de manière dynamique via DHCP. +>> > +>> > Vous devrez effectuer la même opération pour chaque zone où vos instances sont présentes. +>> > +>> +>> > [!warning] +>> > +>> > Faites attention à bien séparer vos pools d’adresses IP pour les différentes régions. Par exemple : +>> > +>> > - De 192.168.0.2 à 192.168.0.254 pour SBG1. +>> > - De 192.168.1.2 à 192.168.1.254 pour GRA1. +>> > +>> +> Depuis Terraform +>> +>> Dans Terraform, il faut utiliser le provider OpenStack. Vous pouvez télécharger un exemple de script terraform complet dans [ce dépôt GitHub](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> La partie spécifique à OVHcloud pour l'intégration vRack est le paramètre `value_specs`. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Depuis la CLI OpenStack +>> Dans l'exemple suivant, nous spécifions le `VLAN_ID` auquel nous voulons que le réseau fasse partie via `--provider-network-type` et `--provider-segment`. +>> +>> Vous pouvez supprimer ces paramètres. Dans ce cas, un `VLAN_ID` disponible sera utilisé. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Étape 3 : Intégrer une instance dans le vRack @@ -232,105 +573,620 @@ Deux situations peuvent se présenter à vous : - L'instance n'existe pas encore. - L'instance existe déjà et vous devez l'ajouter au vRack. -**Cas d'une nouvelle instance** - -#### Depuis l'espace client OVHcloud - -Consultez le guide [Créer une instance depuis l’espace client](/pages/public_cloud/compute/public-cloud-first-steps). Lors de la création d'une instance, vous pouvez choisir, à l'étape 5, un mode réseau, puis un réseau privé dans lequel intégrer votre instance. - -![attach new instance](images/network-selection.png){.thumbnail} - -> [!warning] -> Lors de la création d'une nouvelle instance, vous ne pourrez raccorder votre instance qu'à un seul vRack depuis l'espace client OVHcloud. -> Pour ajouter plusieurs interfaces différentes, vous devrez passer par les API OpenStack ou Horizon. -> - -#### Depuis les APIv6 OVHcloud - -Cliquez [ici](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#etape-4-integrer-une-instance-dans-le-vrack) pour consulter le guide spécifique à cette méthode. - -**Cas d'une instance déjà existante** - -L'espace client OVHcloud permet d'attacher une instance à un ou plusieurs réseaux privés mais n'offre pas de configuration avancée des interfaces réseaux. Si vous souhaitez personnaliser davantage celles-ci, il vous faudra les gérer soit depuis les APIv6 OVHcloud, soit via les API OpenStack ou via Horizon. +/// details | **Cas d'une nouvelle instance** + +> [!tabs] +> Depuis l'espace client OVHcloud +>> Consultez le guide « [Créer une instance depuis l’espace client](/pages/public_cloud/compute/public-cloud-first-steps) ». Lors de la création d'une instance, vous pouvez choisir à l'étape 5, un mode réseau puis un réseau privé dans lequel intégrer votre instance. +>> +>> ![attach new instance](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > Lors de la création d'une nouvelle instance, vous ne pourrez raccorder votre instance qu'à **un seul** vRack depuis l'espace client OVHcloud. +>> > +>> > Pour ajouter plusieurs interfaces différentes, vous devrez passer par les API OpenStack ou Horizon. +>> > +>> +> Depuis les APIv6 OVHcloud +>> Une fois connecté à l'[APIv6 OVHcloud](/links/api), exécutez les commandes suivantes dans l'ordre. +>> +>> **Étape 1 - Récupération des informations nécessaires** +>> +>> **Récupération de l'identifiant du projet :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Récupération du networkID du réseau public (EXT-NET)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Récupération du networkID du réseau privé (interface vRack créée précédemment)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > L'identifiant alors obtenu a la forme : « pn-xxxxx_yy » où yy est le numéro du VLAN. +>> > +>> +>> **Récupération de l'identifiant du type d'instance choisi (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > Vous pouvez limiter la liste en indiquant la zone de création de votre instance. +>> > +>> +>> **Récupération de l'identifiant de l'image choisie (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > Vous pouvez limiter la liste en indiquant la zone de création de votre instance. +>> > +>> +>> **Récupération de l'identifiant de votre clé SSH OpenStack (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> Si vous n'avez pas encore ajouté de clé SSH à votre espace client, vous pourrez le faire au travers de la fonction API suivante : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> **Étape 2 - Déploiement de l'instance** +>> +>> Une fois l'ensemble des éléments nécessaires au déploiement rassemblés, vous pouvez utiliser l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> Vous devrez renseigner a minima les champs suivants : +>> +>> |Champ|Description| +>> |---|---| +>> |serviceName|Identifiant du projet Public Cloud concerné.| +>> |flavorId|Identifiant du type d'instance (par exemple : D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|Identifiant du l'image de déploiement (par exemple : Debian 9, Centos 7, etc.).| +>> |name|Nom que vous donnez à votre instance.| +>> |networks|Dans la partie « networkId », indiquez l'identifiant du réseau public (ext-net) ou celui de votre VLAN (pn-xxxxxx_yy). Vous pouvez cliquer sur le bouton « + » pour ajouter d'autres réseaux.| +>> |region|Régions de déploiement de l'instance (par exemple : GRA5).| +>> |sshKeyId|Identifiant de votre clé SSH OpenStack.| +>> +>> Une fois l'appel effectué, si toutes les informations sont correctement renseignées, l'instance va se créer avec une ou plusieurs interfaces réseau. +>> +>> > [!warning] +>> > +>> > Selon les systèmes d'exploitation, vous devrez configurer manuellement vos interfaces réseau privées pour que la prise en compte se fasse.
+>> > OpenStack n'étant pas en mesure de prioriser l'interface publique de l'interface vRack, il peut arriver que cette dernière passe en tant que route par défaut.
+>> > La conséquence directe est que l'instance est injoignable depuis une IP publique.
+>> > Un ou plusieurs redémarrages de l'instance depuis l'espace client peut permettre de rétablir la situation.
+>> > L'autre solution consiste à vous connecter à l'instance en SSH au travers d'un autre de vos serveurs présents dans le même réseau privé. Vous pouvez aussi corriger la configuration réseau de l'instance au travers du mode Rescue. +>> > +>> +> Depuis la CLI OpenStack +>> **Récupération des informations nécessaires** +>> +>> Identification des réseaux publics et privés : +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MonVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MonVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MonVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MonVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Vous devrez noter les ID des réseaux vous intéressant : +>> > +>> > - Ext-Net pour avoir une IP publique. +>> > - Celui du ou des VLAN nécessaires à votre configuration. +>> > +>> +>> Pensez également à noter les informations suivantes, comme indiqué dans le [guide d'utilisation de l'API Nova](/pages/public_cloud/compute/starting_with_nova) : +>> +>> - ID ou nom de la clé SSH OpenStack. +>> - ID du type d'instance (flavor). +>> - ID de l'image souhaitée (Système d'exploitation, snapshot, etc.). +>> +>> **Déploiement de l'instance** +>> +>> Avec les éléments récupérés précédemment, il est possible de créer une instance en l'incluant directement dans le vRack : +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Par exemple : +>> +>> ```bash +>> nova boot --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nom de la clé] | +>> | metadata | {} | +>> | name | [nom de votre instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Par exemple : +>> +>> ```bash +>> openstack server create --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nom de la clé] | +>> | metadata | {} | +>> | name | [nom de votre instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> Vous avez la possibilité de définir l'adresse IP de l'instance de votre interface vRack au niveau d'OpenStack. +>> +>> Pour cela, vous pouvez ajouter un simple argument dans la fonction « --nic » : +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Par exemple : +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Vérification de l'instance** +>> +>> Après quelques instants, on peut vérifier la liste des instances existantes afin de retrouver le serveur créé : +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Nom de l'instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | [Nom-de-l'instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Nom-de-l'instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **Cas d'une instance déjà existante** + +L'espace client OVHcloud permet d'attacher une instance à un ou plusieurs réseaux privés mais n'offre pas de configuration avancée des interfaces réseau. Si vous souhaitez personnaliser davantage celles-ci, il vous faudra les gérer soit depuis les APIv6 OVHcloud, soit via les API OpenStack ou via Horizon. L'action consistera alors à simplement ajouter une nouvelle interface réseau à votre serveur, en plus de celle existante. Ainsi, par exemple, si vous avez une interface publique *eth0*, vous aurez en plus une interface *eth1*. > [!warning] -> La configuration de cette nouvelle interface est rarement automatique. -> Il vous faudra donc la configurer en DHCP ou IP Fixe selon votre infrastructure. +> La configuration de cette nouvelle interface est rarement automatique. Il vous faudra donc la configurer en DHCP ou en IP fixe selon votre infrastructure. > -#### Depuis l'espace client OVHcloud - -Connectez-vous à votre [espace client OVHcloud](/links/manager), accédez à la section `Public Cloud`{.action} et sélectionnez ensuite le projet Public Cloud concerné en haut à gauche. - -Cliquez alors sur `Instances`{.action} dans le menu latéral de gauche. Cliquez ensuite sur le bouton `...`{.action} à droite de l'instance concernée puis sur `Détail de l'instance`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -Le tableau de bord de votre instance vous est alors présenté. Cliquez sur le bouton `...`{.action} à droite de « Réseau(x) privé(s) » puis sur `Attacher un réseau`{.action}. - -![attacher réseau](images/vrack2021-01.png){.thumbnail} - -Dans la pop-up qui apparaît, sélectionnez le ou les réseaux privés à attacher à votre instance puis cliquez sur `Attacher`{.action}. - -![attacher réseau](images/vrack9.png){.thumbnail} +> [!tabs] +> Depuis l'espace client OVHcloud +>> Connectez-vous à votre [espace client OVHcloud](/links/manager), accédez à la section `Public Cloud`{.action} et sélectionnez le projet Public Cloud concerné en haut à gauche. +>> +>> Cliquez alors sur `Instances`{.action} dans le menu latéral de gauche. Cliquez ensuite sur le bouton `⁝`{.action} à droite de l'instance concernée puis sur `Détail de l'instance`{.action}. +>> +>> ![detail instance](images/instance_details.png){.thumbnail} +>> +>> Le tableau de bord de votre instance vous est alors présenté. Cliquez sur le bouton `⁝`{.action} à droite de « Réseaux privés » puis sur `Attacher un réseau`{.action}. +>> +>> ![attacher réseau](images/vrack2021-01.png){.thumbnail} +>> +>> Dans la pop-up qui apparaît, sélectionnez le ou les réseaux privés à attacher à votre instance puis cliquez sur `Confirmer`{.action}. +>> +>> ![attacher réseau](images/vrack9.png){.thumbnail} +>> +> Depuis les APIv6 OVHcloud +>> L'action consistera simplement à ajouter une nouvelle interface réseau à votre serveur, en plus de celle existante. +>> +>> Ainsi, par exemple, si le serveur dispose d’une interface publique eth0, une interface supplémentaire eth1 sera ajoutée. +>> +>> > [!primary] +>> > +>> > La configuration de cette nouvelle interface est rarement automatique.
+>> > Il vous faudra donc la configurer en DHCP ou en IP fixe selon votre infrastructure. +>> > +>> +>> **Les étapes ci-dessous décrivent comment effectuer la gestion des interfaces réseau de vos instances.** +>> +>> **Étape 1 - Récupération des informations nécessaires** +>> +>> **Récupération de l'identifiant du projet :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Récupération de l'identifiant de l'instance :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Récupération du networkID du réseau public (EXT-NET) :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Récupération du networkID du réseau privé (interface vRack créée précédemment) :** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > L'identifiant alors obtenu a la forme : « pn-xxxxx_yy » où yy est le numéro du VLAN. +>> > +>> +>> **Étape 2 - Ajout d'une interface à votre instance** +>> +>> Une fois l'ensemble des informations nécessaires récupérées, vous pouvez utiliser l'appel suivant : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> Vous devrez renseigner a minima les champs suivants : +>> +>> |Champ|Description| +>> |---|---| +>> |serviceName|Identifiant du projet Public Cloud concerné.| +>> |instanceId|Identifiant de l'instance concernée.| +>> |networkId|Indiquez l'identifiant du réseau public (ext-net) ou celui de votre VLAN (pn-xxxxxx_yy).| +>> |ip|Définir une IP spécifique (fonctionne uniquement pour les interfaces privées).| +>> +>> Une fois l'appel effectué, si toutes les informations sont correctement renseignées, une nouvelle interface va s'ajouter sur votre instance. +>> +>> > [!primary] +>> > +>> > Votre instance OVHcloud disposera donc d'une nouvelle interface réseau en plus de l'interface publique (Ext-net).
+>> > Vous pourrez voir, dans le résumé de l'instance, l'adresse IP privée attribuée automatiquement à votre interface.
+>> > À votre charge de l'utiliser en configurant votre interface via le DHCP ou en utilisant vos propres adresses IP au travers d'une configuration en IP statique. +>> > +>> +>> **Étape 3 - Détacher une interface de votre instance** +>> +>> > [!warning] +>> > +>> > Détacher une interface réseau entraîne sa suppression immédiate. +>> > +>> > Cependant, il est important de noter que si vous détachez l'interface « Ext-Net » (IP publique), cette adresse serait relâchée et remise en circulation. Vous ne pourriez donc pas vous la réattribuer.
+>> > Cette action n'est à effectuer que si vous souhaitez isoler votre serveur dans le vRack (réseau privé) ou, à l’inverse, le retirer d’un ou de plusieurs VLAN. +>> > +>> +>> Une fois l'ensemble des informations nécessaires récupérées, vous pouvez utiliser l'appel suivant pour supprimer une interface : +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> Vous devrez renseigner a minima les champs suivants : +>> +>> |Champ|Description| +>> |---|---| +>> |serviceName|Identifiant du projet Public Cloud concerné.| +>> |instanceId|Identifiant de l'instance concernée.| +>> |networkId|Indiquez l'identifiant du réseau public (ext-net) ou celui de votre VLAN (pn-xxxxxx_yy).| +>> +> Depuis OpenStack Horizon +>> Connectez-vous à l'interface [Horizon](https://horizon.cloud.ovh.net/auth/login/) en suivant la méthode indiquée dans la [première partie de ce guide](#horizon). +>> +>> Connectez-vous sur votre zone de travail : +>> +>> ![connexion Horizon](images/horizon1.png){.thumbnail} +>> +>> Dirigez-vous ensuite dans `Compute`, puis `Instances` : +>> +>> ![Horizon compute instances](images/horizon2.png){.thumbnail} +>> +>> **Ajout d'une interface réseau privée** +>> +>> Pour ajouter une interface, dans la colonne `Actions`, cliquez sur la flèche permettant d'accéder aux actions possible sur l'instance. Cliquez alors sur `Attach Interface`{.action} : +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Sélectionnez votre interface et validez : +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Votre instance OVHcloud disposera donc d'une nouvelle interface réseau en plus de l'interface publique (Ext-net).
+>> > Vous pourrez voir, dans le résumé de l'instance, l'adresse IP privée attribuée automatiquement à votre interface.
+>> > À votre charge de l'utiliser en configurant votre interface via le DHCP ou en utilisant vos propres adresses IP au travers d'une configuration en IP statique. +>> > +>> +>> **Détacher une interface réseau** +>> +>> > [!warning] +>> > +>> > Détacher une interface réseau entraîne sa suppression immédiate. +>> > +>> > Cependant, il est important de noter que si vous détachez l'interface « Ext-Net » (IP publique), cette adresse serait relâchée et remise en circulation. Vous ne pourriez donc pas vous la réattribuer.
+>> > Cette action n'est à effectuer que si vous souhaitez isoler votre serveur dans le vRack (réseau privé) ou, à l’inverse, le retirer d’un ou de plusieurs VLAN. +>> > +>> +>> Pour détacher une interface réseau privée, dans la colonne `Actions`, cliquez sur la flèche permettant d'accéder aux actions possible sur l'instance. Cliquez alors sur `Detach Interface`{.action} : +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Sélectionnez l'interface à supprimer et validez : +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Depuis la CLI OpenStack +>> **Récupération des informations nécessaires** +>> +>> Identification de vos instances : +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Mon-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MonVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Mon-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MonVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Identification des réseaux publics et privés : +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MonVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MonVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MonVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MonVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Vous devrez noter les ID des réseaux vous intéressant : +>> > +>> > - Ext-Net pour avoir une IP publique. +>> > - Celui du ou des VLAN nécessaires à votre configuration. +>> > +>> +>> **Ajout d'une interface réseau privée** +>> +>> Afin d'attacher une nouvelle interface, vous pouvez effectuer la commande suivante : +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Par exemple : +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> Vous pouvez vérifier que l'action à bien été prise en compte : +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => votre IP publique +>> | MonVLAN-42 network | 192.168.0.x | => votre IP privée +>> [...] +>> ``` +>> +>> ou +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MonVLAN-42=192.168.0.x | => votre IP publique ; votre IP privée +>> [...] +>> ``` +>> + +### Détacher une interface réseau -#### Gestion des interfaces réseaux depuis les APIv6 OVHcloud - -Cliquez [ici](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#cas-dune-instance-deja-existante) pour consulter le guide spécifique à cette méthode. - -#### Gestion des interfaces réseaux depuis OpenStack Horizon - -Connectez-vous à l'interface [Horizon](https://horizon.cloud.ovh.net/auth/login/) en suivant la méthode indiquée dans la [première partie de ce guide](./#interface-horizon). - -Connectez-vous bien sur votre zone de travail : - -![connexion Horizon](images/horizon1.png){.thumbnail} - -Dirigez-vous ensuite dans `Compute`, puis `Instances` : - -![Horizon compute instances](images/horizon2.png){.thumbnail} - -**Ajout d'une interface réseau privée** - -Pour ajouter une interface, dans la colonne « Actions », cliquez sur la flèche permettant d'accéder aux actions possible sur l'instance. Cliquez alors sur `Attach Interface`{.action} : - -![Horizon attach interface](images/horizon3.png){.thumbnail} +> [!warning] +> Détacher une interface réseau entraîne sa suppression immédiate. +> +> Cependant, il est important de noter que si vous détachez l'interface « Ext-Net » (IP publique), cette adresse serait relâchée et remise en circulation. Vous ne pourriez donc pas vous la réattribuer.
+> Cette action n'est à effectuer que si vous souhaitez isoler votre serveur dans le vRack (réseau privé) ou, à l’inverse, le retirer d’un ou de plusieurs VLAN. +> -Sélectionnez votre interface et validez : +Pour détacher une interface réseau, vous aurez besoin dans un premier temps d'identifier le port Neutron qui aura été créé. -![Horizon attach interface](images/horizon4.png){.thumbnail} +Pour cela, vous pouvez utiliser les commandes suivantes : -> [!primary] -> Votre instance OVHcloud disposera donc d'une nouvelle interface réseau en plus de l'interface publique (Ext-net). ->
Vous pourrez voir, dans le résumé de l'instance, l'adresse IP privée attribuée automatiquement à votre interface. ->
À votre charge de l'utiliser en configurant votre interface via le DHCP ou en utilisant vos propres IP au travers d'une configuration en IP statique. -> +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` -**Détacher une interface réseau** +ou + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -> [!warning] -> Détacher une interface réseau entraîne sa suppression immédiate. -> -> Cependant, il est important de noter que si vous detacher l'interface « Ext-Net » (IP publique), cette adresse serait relâchée et remise en circulation. Vous ne pourriez donc pas vous la réattribuer. ->
Cette action n'est à effectuer que si vous souhaitez isoler votre serveur dans le vRack (réseau privée) ou dans le cas contraire la sortir d'un ou plusieurs VLAN. -> +Une fois le port à supprimer identifié, vous pouvez effectuer la commande suivante : -Pour détacher une interface réseau privée, dans la colonne « Actions », cliquez sur la flèche permettant d'accéder aux actions possible sur l'instance. Cliquez alors sur `Detach Interface`{.action} : +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Par exemple : -Sélectionnez l'interface à supprimer et validez : +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +/// ## Aller plus loin -[Configuration du vRack Public Cloud depuis les APIv6 OVHcloud](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) - [Serveurs Dédiés - Créer plusieurs VLAN dans le vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) Si vous avez besoin d'une formation ou d'une assistance technique pour la mise en oeuvre de nos solutions, contactez votre commercial ou cliquez sur [ce lien](/links/professional-services) pour obtenir un devis et demander une analyse personnalisée de votre projet à nos experts de l’équipe Professional Services. diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.it-it.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.it-it.md index 80ad92b6755..6242c638354 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.it-it.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.it-it.md @@ -1,337 +1,1194 @@ --- title: Configurazione della vRack sul Public Cloud excerpt: Scopri come configurare la vRack per le tue istanze Public Cloud -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Obiettivo -La [vRack](/links/network/vrack) è una rete privata che permette di configurare l'indirizzamento tra diversi server dedicati OVHcloud. Permette anche di aggiungere [istanze Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps) alla tua rete privata per creare un'infrastruttura di risorse fisiche e virtuali. +Il [vRack](/links/network/vrack) è una rete privata che ti permette di configurare l'indirizzamento tra diversi Server dedicati OVHcloud. Ma ti permette anche di aggiungere delle [istanze Public Cloud](/links/public-cloud/Compute) alla tua rete privata per creare un'infrastruttura di risorse fisiche e virtuali. -**Questa guida ti mostra come configurare le istanze Public Cloud all'interno della tua vRack.** +**Questa guida ha l'obiettivo di accompagnarti nella configurazione delle tue istanze Public Cloud all'interno del tuo vRack.** ## Prerequisiti -- Disporre di un [progetto Public Cloud](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) -- Avere accesso allo [Spazio Cliente OVHcloud](/links/manager) -- Aver [creato un utente OpenStack](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user#crea-un-utente-openstack) (facoltativo) -- Conoscenze di rete elementari +- Avere un [progetto Public Cloud](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) +- Essere connesso al tuo [Spazio Cliente OVHcloud](/links/manager) +- Avere [creato un utente OpenStack](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user) (opzionale) +- Conoscenze di rete di base ## Presentazione delle interfacce -Per creare la tua vRack o aggiungere un'istanza all'interno della rete, potresti aver bisogno di utilizzare lo Spazio Cliente OVHcloud, le APIv6 OVHcloud, le API OpenStack, l'interfaccia Horizon o Terraform. - -In base al tuo profilo tecnico e alle tue esigenze, dovrai scegliere quale interfaccia o metodo utilizzare. In questo modo, per ogni azione, vi proporremo le varie opzioni possibili. - -**Ecco una breve descrizione delle azioni possibili secondo il metodo/interfaccia scelto.** +Che si tratti di creare il tuo vRack o di aggiungere un'istanza all'interno di questa rete, potresti essere chiamato a utilizzare l'Spazio Cliente OVHcloud, le APIv6 OVHcloud, le API OpenStack, l'interfaccia Horizon o Terraform. -### Spazio Cliente OVHcloud +A seconda del tuo profilo tecnico e delle tue esigenze, potresti dover scegliere quale interfaccia o metodo utilizzare. Pertanto, per ogni azione, ti proporremo le diverse procedure possibili. -Lo [Spazio Cliente OVHcloud](/links/manager) è un'interfaccia completa e solo visiva, che la rende ideale per la gestione di più VLAN. Avrai anche la possibilità di personalizzare la classe di IP privato che, di default, è 10.x.x.x/16. +**Ecco una descrizione rapida delle azioni possibili in base al metodo/interfaccia scelto:** -Le VLAN saranno installate nella Region selezionata. È inoltre possibile attivare gateway, distribuzioni DHCP e così via. +/// details | Spazio Cliente OVHcloud -La fatturazione dei tuoi servizi è disponibile nello Spazio Cliente OVHcloud. +[Lo Spazio Cliente OVHcloud](/links/manager) è un'interfaccia completamente e unicamente visiva, che lo rende un'interfaccia ideale per la gestione di diversi VLAN. Avrai inoltre la possibilità di personalizzare l'intervallo di IP privati, che di default è 10.1.0.0/16. -### Interfaccia Horizon +I VLAN verranno distribuiti nella Regione selezionata. Avrai inoltre la possibilità di attivare o meno le passerelle, attivare le distribuzioni DHCP, ecc. -Interfaccia visiva indipendente di OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) è l'implementazione iniziale della dashboard di OpenStack, che fornisce un'interfaccia utente web ai servizi OpenStack, in particolare Nova, Swift, Keystone, ecc. +Potrai inoltre gestire la fatturazione dei tuoi servizi attraverso il tuo Spazio Cliente OVHcloud. -Questa interfaccia completa e tecnica ti permette di gestire quasi tutte le azioni OpenStack. Sarà una delle interfacce necessarie per gestire più di due VLAN, aggiungere interfacce di rete private alle tue istanze, gestire immagini personalizzate, ecc. +/// -Consulta la guida [Creare un utente per accedere a Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) per familiarizzare con Horizon. + -> [!primary] -> Horizon funziona per zona, ti consigliamo di scegliere la zona geografica di lavoro in alto a sinistra della tua interfaccia (GRA5, SBG3, BHS1, ecc.) -> - -### APIv6 OVHcloud +/// details | Interfaccia Horizon -Ogni azione eseguita nello Spazio Cliente OVHcloud utilizza le [APIv6 OVHcloud](/links/api). -È possibile accedere alle API in misura maggiore rispetto allo Spazio Cliente. +Interfaccia visiva indipendente da OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) è l'implementazione originale del pannello di controllo di OpenStack, che fornisce un'interfaccia utente web ai servizi OpenStack, tra cui Nova, Swift, Keystone, ecc. -L'interfaccia è meno visiva dello Spazio Cliente OVHcloud, ma ti permette di effettuare numerose azioni. In questo modo è possibile gestire e personalizzare le tue VLAN, aggiungere interfacce alle tue istanze o creare server altamente personalizzati. +Questa interfaccia completa e tecnica ti permette di gestire la quasi totalità delle azioni OpenStack. Sarà una delle interfacce necessarie se desideri gestire più di due VLAN, aggiungere interfacce di rete private alle tue istanze, gestire immagini personalizzate, ecc. -A volte sarà necessario recuperare più informazioni prima dell'utilizzo di un'API specifica. +Consulta la guida "[Introduzione a Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon)" per familiarizzare con Horizon. -Puoi semplicemente accedere alle API dalla [nostra pagina Web](/links/api), ma anche creare i tuoi script PHP o Python per farvi ricorso. +> [!primary] +> Horizon funzionando per zone, ricorda di selezionare la tua zona geografica di lavoro in alto a sinistra della tua interfaccia (GRA5, SBG3, BHS1, ecc.) +> -In questo modo, potrai automatizzare liberamente le operazioni di base tramite script, ottimizzare le tue funzioni, ecc... +/// -Consulta la guida [Primi passi con le API OVHcloud](/pages/manage_and_operate/api/first-steps), per familiarizzare con l'utilizzo delle APIv6 OVHcloud. +/// details | APIv6 OVHcloud -### API OpenStack +Ogni azione che esegui nello Spazio Cliente OVHcloud richiama le [APIv6 OVHcloud](/links/api). +Puoi addirittura andare più a fondo con le API rispetto al tuo spazio client. -I servizi Public Cloud possono essere gestiti utilizzando le righe di comando Linux o Windows dopo aver scaricato e installato gli strumenti OpenStack. +L'interfaccia è meno visiva dello Spazio Cliente OVHcloud ma ti permetterà di effettuare un gran numero di azioni. Potrai gestire e personalizzare i tuoi VLAN, aggiungere interfacce alle tue istanze o creare server fortemente personalizzati. -A seconda del livello che si desidera gestire, è necessario utilizzare il client **Nova** (Compute), **Neutron** (rete), **Glance** (immagine) o **Swift** (Object storage). L'ultima aggiunta a questo assortimento, il client OpenStack, consente di gestire quasi tutti i livelli OpenStack direttamente. +Potrebbe talvolta essere necessario recuperare diverse informazioni prima di utilizzare un'API specifica. -L'API OpenStack consente inoltre di automatizzare facilmente la gestione tramite gli script. +Puoi accedere facilmente alle API dal [nostro sito web](/links/api), ma puoi anche creare i tuoi script PHP o Python per richiamarle. -Grazie all'API OpenStack, è possibile automatizzare facilmente questa gestione tramite i tuoi script. +In questo modo, potrai liberamente automatizzare le attività di base tramite script, ottimizzare le tue funzioni personali, ecc. -Per familiarizzarti con l'API OpenStack, consulta queste guide: +Consulta la guida "[Primi passi con le API OVHcloud](/pages/manage_and_operate/api/first-steps)" per familiarizzare con l'utilizzo delle APIv6 OVHcloud. -- [Preparare l’ambiente per utilizzare l’API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) -- [Impostare le variabili d'ambiente OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) +/// -A seconda delle tue necessità, puoi utilizzare le API dedicate a OpenStack: +/// details | API OpenStack -- Nova (compute) -- Glance (image) -- Cinder (image) -- Neutron (network) +È possibile amministrare i servizi Public Cloud utilizzando righe di comando Linux o Windows, dopo il download e l'installazione degli strumenti OpenStack. -> [!primary] -> In alcuni casi, sarà più facile utilizzare le API OpenStack e in altri, Nova, Neutron, ecc. -> -> Inoltre, alcune funzionalità potrebbero mancare dall'API OpenStack a seconda della versione del client e del sistema operativo. -Per rendere la guida più accessibile, offre le opzioni più semplici e intuitive. -È possibile consultare la [documentazione ufficiale di OpenStack](https://docs.openstack.org/) se si desidera approfondire la conoscenza del suo utilizzo. -> +Questo metodo richiede buone conoscenze Linux o Windows per poterlo utilizzare, ma permette di sfruttare tutta la potenza di OpenStack in questo modo. -### Terraform +In base alla strato che desideri gestire, dovrai utilizzare il client Nova (Compute), Neutron (rete), Glance (Immagine) o Swift (Object Storage). L'ultimo arrivato della famiglia, il client OpenStack, ti permette di gestire direttamente quasi l'intera strato OpenStack. -Terraform permette inoltre di gestire le infrastrutture di OVHcloud. +Grazie all'API OpenStack, puoi inoltre automatizzare facilmente questa gestione attraverso i tuoi script. -Per farlo, devi scegliere il provider giusto e la risorsa Terraform giusta. Per maggiori informazioni, consulta la nostra [guida all'utilizzo di Terraform (EN)](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +Per familiarizzare con l'API OpenStack, consulta prima i seguenti guide: -## Procedura +- [Preparare l'ambiente per utilizzare l'API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Impostare le variabili d'ambiente OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) -### Step 1: Attivazione e gestione di un vRack +Potrai quindi, in base alle tue esigenze, utilizzare le API dedicate a OpenStack: -#### Dallo Spazio Cliente OVHcloud +- Nova (Compute) +- Glance (immagine) +- Cinder (immagine) +- Neutron (rete) > [!primary] -> Questo non si applica ai progetti appena creati che vengono consegnati automaticamente con una vRack. Per visualizzare la vRack dopo aver creato il progetto, accedi al menu `Network`{.action} nella scheda a sinistra e clicca su `Rete Privata vRack`{.action} per visualizzare le vRack. +> In alcuni casi, sarà più semplice utilizzare le API OpenStack e in altri, le API Nova, Neutron, ecc. +> +> Inoltre, alcune funzionalità potrebbero mancare dall'API OpenStack in base alla versione del tuo client e del tuo sistema operativo. +> Per questa guida, è stato scelto di proporti le alternative più semplici e intuitive. +> Puoi consultare in qualsiasi momento la [documentazione ufficiale di OpenStack](https://docs.openstack.org/fr/) se desideri approfondire il loro utilizzo. > -Se hai un progetto più datato e non hai una vRack, è necessario ordinarne una. Questo prodotto è gratuito e la consegna richiede solo pochi minuti. - -Nel menu a sinistra dello schermo, clicca sul pulsante `Aggiungi un servizio`{.action} (icona del carrello degli acquisti). Utilizza il filtro in alto o scorri verso il basso per trovare il servizio `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} - -Sarai reindirizzato verso un'altra pagina per convalidare l'ordine, l'operazione richiederà alcuni minuti. - -Una volta attivato il servizio, è disponibile nello Spazio Cliente, sezione `Network`{.action} > `Rete Privata vRack`{.action}. Con la denominazione "pn-xxxxxx". - -Nella lista dei servizi compatibili, seleziona il progetto che vuoi aggiungere alla vRack e clicca sul pulsante `Aggiungi`{.action}. - -![aggiungi il progetto](images/addprojectvrack.png){.thumbnail} - - -Per continuare la configurazione della vRack dallo Spazio Cliente OVHcloud, continua la lettura di questa guida utilizzando la [Crea una rete privata dallo Spazio Cliente OVHcloud](./#crea-una-rete-privata-dallo-spazio-cliente-ovhcloud). +/// -#### Dalle APIv6 OVHcloud +/// details | CLI OpenStack -Per attivare e gestire una vRack, clicca [qui](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) (EN), per consultare la guida specifica a questo metodo. +Puoi gestire i tuoi servizi Public Cloud e il tuo vRack OVHcloud direttamente dal tuo terminale Linux o Windows grazie alla CLI OpenStack. -### Step 2: Crea una rete privata nella vRack +Questa interfaccia permette di gestire tutte le strati OpenStack: -È necessario creare una rete privata con una rete locale virtuale (VLAN) in modo che le istanze collegate alla vRack possano comunicare tra loro. +- Nova: istanze (Compute) +- Neutron: reti +- Glance: immagini +- Cinder: volumi -Sull'offerta Public Cloud è possibile creare fino a 4.000 VLAN all'interno di una sola vRack. In questo modo è possibile utilizzare ciascun indirizzo IP privato fino a 4.000 volte. -Ad esempio, l'IP 192.168.0.10 della VLAN 2 è diverso dall'IP 192.168.0.10 della VLAN 42. +La CLI centralizza queste funzionalità e può essere integrata nei tuoi script per automatizzare le tue attività. -Questa operazione potrebbe rivelarsi utile per segmentare la tua vRack tra più reti virtuali. +Prima di iniziare, consulta le seguenti guide: -Dallo Spazio Cliente OVHcloud è possibile assegnare la VLAN scelta e personalizzare la gamma di IP privati. +- [Preparare l'ambiente per utilizzare l'API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Impostare le variabili d'ambiente OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> Sui server dedicati, di default, sei sulla VLAN 0. Per il funzionamento dell'infrastruttura OpenStack è necessario specificare il numero della VLAN direttamente a livello dell'infrastruttura. -> -> Diversamente dai server dedicati, non è necessario "taggare" la VLAN direttamente su un'istanza Public Cloud. -> -> Per maggiori informazioni sulla gestione delle VLAN della vRack dei server dedicati, consulta questa guida: [Creare due o più VLAN nella vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -> [!warning] -> La vRack è un'infrastruttura gestita a livello di OVHcloud e può essere gestita solo dallo Spazio Cliente OVHcloud e dalle APIv6 OVHcloud. > -> Non essendo OpenStack allo stesso livello dell'infrastruttura, non è possibile personalizzare le VLAN tramite l'interfaccia Horizon o le API OpenStack. +> La CLI OpenStack è pratica per gestire il tuo vRack, tuttavia alcune funzioni possono variare in base alla versione del client o del sistema operativo. Consulta la [documentazione ufficiale di OpenStack](https://docs.openstack.org/fr/). > -#### Crea una rete privata dallo Spazio Cliente OVHcloud - -Una volta creata la vRack, il passaggio successivo consiste nel creare una rete privata. - -Nella scheda Public Cloud, clicca su `Private Network`{.action} nel menu di sinistra sotto **Network**. - -![VLAN creation](images/vrack2022-03.png){.thumbnail} - -Clicca su `Crea una rete privata`{.action}. La pagina successiva ti permette di personalizzare diversi parametri. - -Al punto 1, seleziona la Region in cui vuoi creare la rete privata. +/// -![select region](images/vrack5-2024.png){.thumbnail} +/// details | Terraform -Allo step successivo, vengono presentate diverse opzioni: +Terraform permette anche di gestire le infrastrutture di OVHcloud. -![create network](images/vrack6-2022.png){.thumbnail} +Per farlo, devi scegliere il fornitore e la risorsa Terraform corretti. Trova ulteriori informazioni nella nostra [guida all'utilizzo di Terraform](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -Nel campo **Nome rete privata**, digita un nome per la tua rete privata. +/// -**Crea un servizio Gateway e connettiti alla rete privata** +## Procedura -Seleziona questa opzione se intendi creare istanze esclusivamente con rete privata. Per maggiori informazioni, consulta queste guide: [Creating a private network with Gateway (EN)](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) e [Creare e connettersi a un’istanza Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps). +### Passo 1: Attivare e gestire un vRack > [!warning] -> Se l'opzione è grigia, significa che è incompatibile con la Region selezionata. Per maggiori informazioni, consulta la nostra pagina sulla [disponibilità dei prodotti Public Cloud per ogni Region](/links/public-cloud/regions-pci). +> +> Il vRack è gestito a livello di infrastruttura OVHcloud, il che significa che puoi amministrarlo solo dal tuo Spazio Cliente e tramite le APIv6 OVHcloud. > -**Opzioni di rete del layer 2** - -Selezionando la casella `Definisci l’ID della VLAN`, dovrai scegliere un numero di VLAN che varia da 0 a 4000. - -Se non selezioni questa casella, il sistema assegnerà un numero di VLAN casuale. - -Se hai bisogno di far comunicare i server dedicati OVHcloud con VLAN tag, consulta questa guida: [Creare due o più VLAN nella vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**Opzioni DHCP di distribuzione degli indirizzi** - -L'intervallo DHCP predefinito è 10.0.0.0/16. È possibile utilizzare un'altra gamma privata. - -Una volta effettuate le scelte, clicca su `Crea`{.action} per avviare il processo. +> [!tabs] +> Dallo Spazio Cliente OVHcloud +>> > [!primary] +>> > +>> > Questo passo non si applica ai progetti appena creati, che vengono automaticamente forniti con un vRack. Per visualizzare il vRack una volta creato il progetto, vai alla sezione `Network`{.action} e clicca su `Rete privata vRack`{.action} per visualizzare il/i vRack/i. +>> > +>> +>> Se hai un progetto più vecchio e non hai un vRack, devi ordinarne uno. Questo prodotto è gratuito e l'attivazione richiede solo alcuni minuti. +>> +>> Nel menu a sinistra dello schermo, clicca sul pulsante `Aggiungi un servizio`{.action} (icona del carrello). Usa il filtro in alto della pagina o scorri verso il basso per trovare il servizio `vRack`{.action}. +>> +>> ![Ordina il vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> Verrai reindirizzato su un'altra pagina per confermare l'ordine, l'operazione richiederà alcuni minuti. +>> +>> Una volta che il servizio è attivo, lo troverai nel tuo Spazio Cliente nella sezione `Network`{.action} > `Rete privata vRack`{.action}, con la denominazione "pn-xxxxxx". +>> +>> Clicca sul tuo vRack, seleziona il progetto che desideri aggiungervi nella lista dei servizi idonei e clicca sul pulsante `Aggiungi`{.action}. +>> +>> ![aggiungi il progetto](images/addprojectvrack.png){.thumbnail} +>> +>> Per continuare la configurazione del vRack dallo Spazio Cliente OVHcloud, prosegui la lettura di questa guida a partire dal [passo 2: Creare una rete privata nel vRack](#create-pn-in-vrack), scheda **Dallo Spazio Cliente OVHcloud**. +>> +> Dalle APIv6 OVHcloud +>> +>> **Passo 1: Attivare e gestire un vRack** +>> +>> Accedi alle APIv6 OVHcloud seguendo la guida "[Primi passi con le API OVHcloud](/pages/manage_and_operate/api/first-steps)". +>> +>> Una volta autenticato, segui le procedure descritte di seguito: +>> +>> **Creazione del carrello** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata creerà un identificativo per il tuo "carrello". Potrai aggiungervi quanti articoli desideri prima di confermarlo. +>> > +>> > In questo caso, l'ordine di un vRack è gratuito. Recupera il numero del tuo carrello (cartId), ti sarà indispensabile per proseguire. +>> > +>> +>> **Recupero delle informazioni necessarie all'ordine del vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata ti permetterà di recuperare l'insieme delle informazioni necessarie all'ordine del vRack. Copia gli elementi seguenti: +>> > +>> > *cartId*, *duration*, *planCode*, e *pricingMode*. +>> > +>> +>> **Aggiunta del vRack nel carrello** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata ti permetterà di aggiungere il vRack al carrello aggiungendo l'insieme delle informazioni necessarie all'ordine. +>> > +>> > Nel caso del vRack, darebbe ad esempio: +>> > +>> > cartId: [identificativo del tuo carrello] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Una volta che avrai confermato l'ordine, otterrai un numero d'articolo ("itemId"). Conserva questa informazione, ti sarà utile se desideri apportare modifiche prima della conferma del carrello. +>> +>> **Conferma del carrello** +>> +>> Una volta che tutti gli articoli sono nel tuo carrello, dovrai confermarlo: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata confermerà il carrello e ti creerà un ordine (orderId). Conserva questa informazione, ti sarà necessaria per la conferma dell'ordine. +>> > +>> +>> **Conferma dell'ordine finale** +>> +>> Per confermare l'ordine, hai due metodi possibili: +>> +>> - Passare per l'URL visibile quando il carrello è confermato. +>> Esempio d'URL: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Confermare tramite la chiamata seguente: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Anche se si tratta di un ordine a 0 €, è necessario simulare un pagamento dell'ordine (orderId). Il tuo ordine verrà allora confermato e il suo trattamento inizierà. +>> > +>> +>> Una volta che l'ordine gratuito è confermato, può essere necessario attendere alcuni minuti affinché il vRack sia attivo. +>> +>> **Passo 2: Aggiungere il tuo progetto Public Cloud nel vRack** +>> +>> Una volta che il vRack è attivo, dovrai integrare il tuo/i progetti Public Cloud nel vRack. +>> +>> Accedi alle APIv6 OVHcloud seguendo la guida "[Primi passi con le API OVHcloud](/pages/manage_and_operate/api/first-steps)". +>> +>> Nel caso in cui l'identificativo del progetto Public Cloud non sia noto, le chiamate seguenti ti permetteranno di recuperarlo. +>> +>> **Identificazione del progetto** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata permette di recuperare l'elenco dei progetti. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata permette di identificare il progetto grazie al campo "description". +>> > +>> +>> **Aggiunta del progetto nel vRack** +>> +>> Una volta conosciuti l'identificativo del progetto e il nome del vRack, la loro associazione si effettua tramite la chiamata seguente: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Compila i campi della chiamata con le informazioni rilevate in precedenza: +>> +>> - **serviceName**: nome del vRack nella forma "pn-xxxxxx". +>> - **project**: identificativo del progetto Public Cloud, nella forma di una stringa di 32 caratteri. +>> +>> > [!primary] +>> > +>> > Questa chiamata inizializza l'associazione del progetto al vRack, è necessario quindi recuperare l'identificativo della task per verificare il suo avanzamento. +>> > +>> +>> **Verifica dell'avanzamento della task di aggiunta** +>> +>> Puoi consultare l'evoluzione dell'aggiunta del progetto nel vRack grazie a questa chiamata: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata è facoltativa e permette solo di verificare lo stato della task. Una volta che questa è terminata, puoi passare al passo successivo. +>> > +>> + +### Passo 2: Creare una rete privata nel vRack + +È necessario creare una rete privata con una rete locale virtuale (VLAN) affinché le istanze collegate al vRack possano comunicare tra loro. + +Sull'offerta Public Cloud, puoi creare fino a 4 000 VLAN all'interno di un unico vRack. Ciò significa che puoi utilizzare ogni indirizzo IP privato fino a 4 000 volte. +Così, ad esempio, l'IP 192.168.0.10 della VLAN 2 è diverso dall'IP 192.168.0.10 della VLAN 42. + +Questo può esserti utile per segmentare il tuo vRack tra diversi reti virtuali. + +Dallo Spazio Cliente OVHcloud e dalle APIv6 OVHcloud è possibile personalizzare tutte le impostazioni: modalità e regione di distribuzione, nome e ID della VLAN, intervallo di indirizzi IP privati (ad esempio 10.0.0.0/16), DHCP e gateway. > [!primary] -> La creazione della rete privata potrebbe richiedere alcuni minuti. +> Nei Server dedicati, per default sei sulla VLAN 0. Il funzionamento dell'infrastruttura OpenStack fa sì che tu debba specificare il numero della tua VLAN direttamente a livello di infrastruttura. > +> A differenza dei Server dedicati, non è necessario "taggare" la VLAN direttamente su un'istanza Public Cloud. +> +> Per ulteriori informazioni sulla gestione delle VLAN del vRack dei Server dedicati, consulta questa guida: [Creare più VLAN nel vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). -#### Crea una VLAN dalle APIv6 OVHcloud - -Per creare una VLAN dalle APIv6 OVHcloud, clicca [qui](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) (EN), per consultare la guida specifica a questo metodo. - -#### Crea una rete privata via Terraform - -In Terraform, è necessario utilizzare il provider openstack. È possibile scaricare un esempio di script terraform completo in [questo deposito](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -La sezione specifica di OVHcloud per l'integrazione vRack è il parametro `value_specs`. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` - -### Step 3: Integra un'istanza nella vRack +> [!warning] +> Il vRack essendo un'infrastruttura gestita a livello di OVHcloud, non potrai amministrarlo che attraverso lo Spazio Cliente OVHcloud e le APIv6 OVHcloud. +> +> OpenStack non essendo situato allo stesso livello dell'infrastruttura, non potrai personalizzare le VLAN attraverso l'interfaccia Horizon o le API OpenStack. +> -Possono presentarsi due situazioni: +> [!tabs] +> Dal Spazio Cliente OVHcloud +>> Dopo aver creato il vRack, il passo successivo consiste nel creare una rete privata. +>> +>> Nella scheda `Public cloud`{.action}, clicca su `Private Network`{.action} nel menu a sinistra sotto **Network**. +>> +>> ![Creazione VLAN](images/vrack2022-03.png){.thumbnail} +>> +>> Clicca ora su `Crea una rete privata`{.action}. La pagina successiva ti permetterà di personalizzare diversi parametri. +>> +>> Per iniziare, seleziona una modalità di distribuzione e la regione in cui desideri creare la rete privata. +>> +>> ![Seleziona regione](images/vrack5-2024.png){.thumbnail} +>> +>> Nella fase successiva, ti vengono presentate diverse opzioni: +>> +>> ![Creazione rete](images/vrack6-2022.png){.thumbnail} +>> +>> Nel campo **Nome della rete privata**, definisci un nome per la tua rete privata. +>> +>> **Opzione rete del layer 2** +>> +>> Se selezioni la casella `Definisci un ID VLAN`{.action}, dovrai scegliere un numero VLAN compreso tra 0 e 4000. +>> +>> Se non selezioni questa casella, il sistema assegnerà un numero VLAN casuale. +>> +>> Nel caso in cui tu debba far comunicare dei Server dedicati OVHcloud con VLAN taggati, consulta la seguente guida: [Creare più VLAN in un vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **Opzioni di distribuzione degli indirizzi DHCP** +>> +>> L'intervallo DHCP predefinito è 10.1.0.0/16. Puoi utilizzare un altro intervallo privato a tua scelta o disattivare il DHCP per questa rete privata. +>> +>> **Opzioni gateway di rete** +>> +>> - **Annunciare la prima indirizzo di un CIDR come gateway predefinito (opzione DHCP 3)**: Quando questa opzione è attivata, il server DHCP annuncia il primo indirizzo del CIDR come gateway predefinito alle macchine collegate alla rete. +>> - **Assegna una Gateway e collegati alla rete privata**: Seleziona questa opzione se hai l'intenzione di creare delle istanze con una rete privata esclusivamente. Per ulteriori informazioni, ti invitiamo a consultare le seguenti guide: [Creare una rete privata con una Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) e [Creare una prima istanza Public Cloud e collegarvisi](/pages/public_cloud/Compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > Se la seconda opzione è grigia, significa che è incompatibile con la regione selezionata. Per ulteriori informazioni, ti invitiamo a consultare la nostra pagina sulla [disponibilità dei prodotti Public Cloud per ogni regione](/links/public-cloud/regions-pci). +>> > +>> +>> Una volta effettuate le tue scelte, clicca su `Configura la tua rete privata`{.action} per avviare il processo. +>> +>> > [!primary] +>> > +>> > La creazione della rete privata può richiedere diversi minuti. +>> > +>> +> Dalle APIv6 OVHcloud +>> +>> Una volta connesso all'[APIv6 OVHcloud](/links/api), esegui i seguenti comandi nell'ordine. +>> +>> **Passo 1 - Recupero delle informazioni necessarie:** +>> +>> **Progetto Public Cloud** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata permette di recuperare l'elenco dei progetti. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata permette di identificare il progetto grazie al campo "description". +>> > +>> +>> **vRack interessato** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Nel campo serviceName, indica l'identificativo del tuo progetto. Conserva l'informazione relativa all'identificativo del vRack nella forma "pn-xxxxx". +>> > +>> +>> **Passo 2 - Creazione della rete privata:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Compila i campi con le informazioni precedentemente ottenute: +>> > +>> > - **serviceName**: ID del progetto. +>> > - **name**: il nome che desideri dare al VLAN. +>> > +>> > Puoi lasciare il campo "Region" vuoto per attivarlo in tutte le regioni. +>> > +>> > L'identificativo del VLAN (vlanId) è necessario se desideri creare un VLAN specifico. +>> > +>> +>> La creazione richiede alcuni istanti. +>> +>> Per verificare le informazioni dei tuoi VLAN, puoi utilizzare la seguente chiamata: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Questa chiamata permette di recuperare il networkId. Questo si presenterà nella forma seguente: nome-vrack_vlanId. +>> > +>> > Ad esempio, per il VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Passo 3 - Creazione del sottorete:** +>> +>> Per default, se non aggiungi un sottorete, l'intervallo IP utilizzato è il seguente: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> Se desideri gestire personalmente le assegnazioni IP, dovrai creare un sottorete. +>> +>> Per farlo, una volta creato il VLAN, dovrai creare il sottorete per ogni zona interessata tramite la seguente chiamata: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Puoi compilare i campi come segue: +>> +>> |Campo|Descrizione| +>> |---|---| +>> |serviceName|Identificativo del tuo progetto.| +>> |networkId|Identificativo della tua rete recuperato durante i comandi precedenti. Ad esempio: pn-xxxxxx_42 per il VLAN 42.| +>> |dhcp|Casella selezionata per attivazione / non selezionata per disattivazione del DHCP nel VLAN.| +>> |end|Ultimo indirizzo del sottorete della regione. Ad esempio: 192.168.1.50.| +>> |network|Blocco IP del sottorete. Ad esempio: 192.168.1.0/24.| +>> |region|Ad esempio: SBG3.| +>> |start|Primo indirizzo del sottorete per questa regione. Ad esempio: 192.168.1.15.| +>> +>> > [!primary] +>> > +>> > Questo è il passo per la creazione del sottorete per regione. Puoi attivare o meno l'assegnazione di indirizzi IP privati in modo dinamico tramite DHCP. +>> > +>> > Dovrai effettuare la stessa operazione per ogni zona in cui sono presenti le tue istanze. +>> > +>> +>> > [!warning] +>> > +>> > Fai attenzione a separare correttamente i tuoi pool di indirizzi IP per le diverse regioni. Ad esempio: +>> > +>> > - Da 192.168.0.2 a 192.168.0.254 per SBG1. +>> > - Da 192.168.1.2 a 192.168.1.254 per GRA1. +>> > +>> +> Da Terraform +>> +>> In Terraform, devi utilizzare il provider OpenStack. Puoi scaricare un esempio completo di script terraform da [questo repository GitHub](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> La parte specifica per OVHcloud per l'integrazione vRack è il parametro `value_specs`. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Dalla CLI OpenStack +>> Nell'esempio seguente, specificiamo il `VLAN_ID` a cui vogliamo che la rete appartenga tramite `--provider-network-type` e `--provider-segment`. +>> +>> Puoi rimuovere questi parametri. In questo caso, verrà utilizzato un `VLAN_ID` disponibile. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> + +### Passo 3: Integrazione di un'istanza nel vRack + +Due situazioni possono presentarsi: - L'istanza non esiste ancora. -- L'istanza esiste già e devi aggiungerla alla vRack. - -**Caso di una nuova istanza** - -#### Dallo Spazio Cliente OVHcloud - -Consulta la guida [Creare un'istanza dallo Spazio Cliente](/pages/public_cloud/compute/public-cloud-first-steps). Durante la creazione di un'istanza, potrai specificare, nello step 5 puoi scegliere una modalità di rete e una rete privata nella quale integrare la tua istanza. - -![attach new instance](images/network-selection.png){.thumbnail} +- L'istanza esiste già e devi aggiungerla al vRack. + +/// details | **Caso di una nuova istanza** + +> [!tabs] +> Dal Spazio Cliente OVHcloud +>> Consulta la guida "[Creare un'istanza dallo spazio cliente](/pages/public_cloud/Compute/public-cloud-first-steps)". Durante la creazione di un'istanza, puoi scegliere all'ultimo passo, un tipo di rete e quindi una rete privata alla quale integrare la tua istanza. +>> +>> ![aggiungi nuova istanza](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > Durante la creazione di una nuova istanza, potrai collegare la tua istanza a **un solo** vRack dallo Spazio Cliente OVHcloud. +>> > +>> > Per aggiungere più interfacce diverse, dovrai utilizzare le API OpenStack o Horizon. +>> > +>> +> Dalle APIv6 OVHcloud +>> Una volta connesso all'[APIv6 OVHcloud](/links/api), esegui i seguenti comandi nell'ordine. +>> +>> **Passo 1 - Recupero delle informazioni necessarie** +>> +>> **Recupero dell'identificativo del progetto:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Recupero del networkID della rete pubblica (EXT-NET)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Recupero del networkID della rete privata (interfaccia vRack creata in precedenza)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > L'identificativo ottenuto ha la forma: "pn-xxxxx_yy" dove yy è il numero del VLAN. +>> > +>> +>> **Recupero dell'identificativo del tipo di istanza scelto (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > È possibile limitare l'elenco specificando la zona di creazione della tua istanza. +>> > +>> +>> **Recupero dell'identificativo dell'immagine scelta (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > È possibile limitare l'elenco specificando la zona di creazione della tua istanza. +>> > +>> +>> **Recupero dell'identificativo della tua chiave SSH OpenStack (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> Se non hai ancora aggiunto una chiave SSH al tuo spazio cliente, puoi farlo utilizzando la seguente funzione API: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> **Passo 2 - Distribuzione dell'istanza** +>> +>> Una volta raccolti tutti gli elementi necessari alla distribuzione, puoi utilizzare il seguente richiamo: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> Dovrai specificare almeno i seguenti campi: +>> +>> |Campo|Descrizione| +>> |---|---| +>> |serviceName|Identificativo del progetto Public Cloud interessato.| +>> |flavorId|Identificativo del tipo di istanza (esempio: D2-2, B2-7, WIN-R2-15, ecc.).| +>> |imageId|Identificativo dell'immagine di distribuzione (esempio: Debian 9, Centos 7, ecc.).| +>> |name|Nome che desideri dare alla tua istanza.| +>> |networks|Nella parte "networkId", indica l'identificativo della rete pubblica (ext-net) o quello del tuo VLAN (pn-xxxxxx_yy). Puoi cliccare sul pulsante "+" per aggiungere altre reti.| +>> |region|Regioni di distribuzione dell'istanza (esempio: GRA5).| +>> |sshKeyId|Identificativo della tua chiave SSH OpenStack.| +>> +>> Una volta effettuato il richiamo, se tutte le informazioni sono state correttamente indicate, l'istanza verrà creata con una o più interfacce di rete. +>> +>> > [!warning] +>> > +>> > A seconda dei sistemi operativi, dovrai configurare manualmente le tue interfacce di rete private affinché vengano prese in considerazione.
+>> > OpenStack non è in grado di dare la priorità all'interfaccia pubblica rispetto all'interfaccia vRack, quindi potrebbe verificarsi che quest'ultima diventi la route predefinita.
+>> > La conseguenza diretta è che l'istanza non è raggiungibile da un'IP pubblica.
+>> > Un riavvio o più riavvii dell'istanza dallo spazio cliente potrebbero permettere di risolvere la situazione.
+>> > Un'altra soluzione consiste nel connettersi all'istanza in SSH attraverso uno dei tuoi server presenti nella stessa rete privata. Puoi anche correggere la configurazione di rete dell'istanza attraverso la modalità Rescue. +>> > +>> +> Dalla CLI OpenStack +>> **Recupero delle informazioni necessarie** +>> +>> Identificazione delle reti pubbliche e private: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MioVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MioVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MioVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MioVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Dovrai annotare gli ID delle reti che ti interessano: +>> > +>> > - Ext-Net per ottenere un'IP pubblica. +>> > - Quello del o dei VLAN necessari alla tua configurazione. +>> > +>> +>> Annota anche le seguenti informazioni, come indicato nella [guida all'utilizzo dell'API Nova](/pages/public_cloud/Compute/starting_with_nova): +>> +>> - ID o nome della chiave SSH OpenStack. +>> - ID del tipo di istanza (flavor). +>> - ID dell'immagine desiderata (Sistema operativo, snapshot, ecc.). +>> +>> **Distribuzione dell'istanza** +>> +>> Con gli elementi recuperati in precedenza, è possibile creare un'istanza includendola direttamente nel vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Per esempio: +>> +>> ```bash +>> nova boot --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nome della chiave] | +>> | metadata | {} | +>> | name | [Nome della tua istanza] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Per esempio: +>> +>> ```bash +>> openstack server create --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nome della chiave] | +>> | metadata | {} | +>> | name | [Nome della tua istanza] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> Hai la possibilità di definire l'indirizzo IP della tua istanza vRack al livello di OpenStack. +>> +>> Per farlo, puoi aggiungere un semplice argomento nella funzione "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Per esempio: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verifica dell'istanza** +>> +>> Dopo pochi istanti, puoi verificare l'elenco delle istanze esistenti per trovare il server creato: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Nome dell'istanza] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | [Nome dell'istanza] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Nome dell'istanza] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **Caso di un'istanza già esistente** + +Lo Spazio Cliente OVHcloud consente di collegare un'istanza a una o più reti private ma non offre una configurazione avanzata delle interfacce di rete. Se desideri personalizzarle ulteriormente, dovrai gestirle tramite le APIv6 OVHcloud, le API OpenStack o tramite Horizon. + +L'azione consiste semplicemente nell'aggiungere una nuova interfaccia di rete al tuo server, oltre a quella esistente. + +Ad esempio, se hai un'interfaccia pubblica *eth0*, avrai in più un'interfaccia *eth1*. > [!warning] -> Quando crei una nuova istanza, accedi alla tua istanza solo con una vRack dallo Spazio Cliente OVHcloud. -> Per aggiungere diverse interfacce, è necessario passare attraverso le API OpenStack o Horizon. +> La configurazione di questa nuova interfaccia non è quasi mai automatica. Dovrai quindi configurarla in DHCP o con un indirizzo IP fisso in base alla tua infrastruttura. > -#### Dalle APIv6 OVHcloud - -Clicca [qui](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) (EN), per consultare la guida specifica a questo metodo. - -**In caso di istanza esistente** - -Lo Spazio Cliente OVHcloud permette di associare un'istanza a una o più reti private ma non offre una configurazione avanzata delle interfacce di rete. Per personalizzarli ulteriormente, è necessario gestirli tramite le APIv6 OVHcloud, le API OpenStack o Horizon. - -L'azione consiste nell'aggiungere una nuova interfaccia di rete al tuo server, oltre a quella esistente. - -Ad esempio, se hai un'interfaccia pubblica *eth0*, avrai anche un'interfaccia *eth1*. +> [!tabs] +> Dallo Spazio Cliente OVHcloud +>> Accedi al tuo [Spazio Cliente OVHcloud](/links/manager), vai alla sezione `Public Cloud`{.action} e seleziona il progetto Public Cloud desiderato in alto a sinistra. +>> +>> Clicca quindi su `Instanze`{.action} nel menu laterale sinistro. Clicca successivamente sul pulsante `⁝`{.action} a destra dell'istanza desiderata e poi su `Dettagli dell'istanza`{.action}. +>> +>> ![dettaglio istanza](images/instance_details.png){.thumbnail} +>> +>> Ti verrà mostrato il pannello del tuo'istanza. Clicca sul pulsante `⁝`{.action} a destra di "Reti private" e poi su `Associa una rete`{.action}. +>> +>> ![collega rete](images/vrack2021-01.png){.thumbnail} +>> +>> Nella finestra che appare, seleziona una o più reti private da collegare alla tua istanza e clicca su `Confermare`{.action}. +>> +>> ![collega rete](images/vrack9.png){.thumbnail} +>> +> Dalle APIv6 OVHcloud +>> L'azione consiste semplicemente nell'aggiungere una nuova interfaccia di rete al tuo server, oltre a quella esistente. +>> +>> Ad esempio, se il server dispone di un'interfaccia pubblica eth0, verrà aggiunta un'interfaccia supplementare eth1. +>> +>> > [!primary] +>> > +>> > La configurazione di questa nuova interfaccia non è quasi mai automatica.
+>> > Dovrai quindi configurarla in DHCP o con un indirizzo IP fisso in base alla tua infrastruttura. +>> > +>> +>> **Le fasi seguenti descrivono come gestire le interfacce di rete delle tue istanze.** +>> +>> **Fase 1 - Recupero delle informazioni necessarie** +>> +>> **Recupero dell'identificativo del progetto:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Recupero dell'identificativo dell'istanza:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Recupero del networkID della rete pubblica (EXT-NET):** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Recupero del networkID della rete privata (interfaccia vRack creata in precedenza):** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > L'identificativo ottenuto ha la forma: "pn-xxxxx_yy" dove yy è il numero del VLAN. +>> > +>> +>> **Fase 2 - Aggiunta di un'interfaccia alla tua istanza** +>> +>> Una volta recuperate tutte le informazioni necessarie, puoi utilizzare la seguente chiamata: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> Dovrai compilare almeno i seguenti campi: +>> +>> |Campo|Descrizione| +>> |---|---| +>> |serviceName|Identificativo del progetto Public Cloud desiderato.| +>> |instanceId|Identificativo dell'istanza desiderata.| +>> |networkId|Indica l'identificativo della rete pubblica (ext-net) o quello del tuo VLAN (pn-xxxxxx_yy).| +>> |ip|Definire un IP specifico (funziona solo per le interfacce private).| +>> +>> Una volta effettuata la chiamata, se tutte le informazioni sono state correttamente indicate, verrà aggiunta una nuova interfaccia alla tua istanza. +>> +>> > [!primary] +>> > +>> > La tua istanza OVHcloud disporrà quindi di una nuova interfaccia di rete oltre all'interfaccia pubblica (Ext-net).
+>> > Potrai vedere, nel riepilogo dell'istanza, l'indirizzo IP privato assegnato automaticamente alla tua interfaccia.
+>> > A tuo carico configurarla tramite il DHCP o utilizzare i tuoi IP personali tramite una configurazione in IP statico. +>> > +>> +>> **Fase 3 - Rimozione di un'interfaccia dalla tua istanza** +>> +>> > [!warning] +>> > +>> > Rimuovere un'interfaccia di rete ne comporta l'eliminazione immediata. +>> > +>> > Tuttavia, è importante notare che se rimuovi l'interfaccia "Ext-Net" (IP pubblico), tale indirizzo verrebbe rilasciato e rimesso in circolazione. Non potresti quindi riassegnartelo.
+>> > Questa azione va effettuata solo se desideri isolare il tuo server nel vRack (rete privata) o, al contrario, rimuoverlo da uno o più VLAN. +>> > +>> +>> Una volta recuperate tutte le informazioni necessarie, puoi utilizzare la seguente chiamata per eliminare un'interfaccia: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> Dovrai compilare almeno i seguenti campi: +>> +>> |Campo|Descrizione| +>> |---|---| +>> |serviceName|Identificativo del progetto Public Cloud desiderato.| +>> |instanceId|Identificativo dell'istanza desiderata.| +>> |networkId|Indica l'identificativo della rete pubblica (ext-net) o quello del tuo VLAN (pn-xxxxxx_yy).| +>> +> Da OpenStack Horizon +>> Accedi all'interfaccia [Horizon](https://horizon.cloud.ovh.net/auth/login/) seguendo il metodo indicato nella [prima parte di questa guida](#horizon). +>> +>> Accedi alla tua area di lavoro: +>> +>> ![connessione Horizon](images/horizon1.png){.thumbnail} +>> +>> Vai quindi in `Compute`, quindi in `Instances`: +>> +>> ![Horizon Compute instances](images/horizon2.png){.thumbnail} +>> +>> **Aggiunta di un'interfaccia di rete privata** +>> +>> Per aggiungere un'interfaccia, nella colonna `Actions`, clicca sulla freccia per accedere alle azioni possibili sull'istanza. Clicca quindi su `Attach Interface`{.action}: +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Seleziona la tua interfaccia e conferma: +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > La tua istanza OVHcloud disporrà quindi di una nuova interfaccia di rete oltre all'interfaccia pubblica (Ext-net).
+>> > Potrai vedere, nel riepilogo dell'istanza, l'indirizzo IP privato assegnato automaticamente alla tua interfaccia.
+>> > A tuo carico configurarla tramite il DHCP o utilizzare i tuoi IP personali tramite una configurazione in IP statico. +>> > +>> +>> **Rimozione di un'interfaccia di rete** +>> +>> > [!warning] +>> > +>> > Rimuovere un'interfaccia di rete ne comporta l'eliminazione immediata. +>> > +>> > Tuttavia, è importante notare che se rimuovi l'interfaccia "Ext-Net" (IP pubblico), tale indirizzo verrebbe rilasciato e rimesso in circolazione. Non potresti quindi riassegnartelo.
+>> > Questa azione va effettuata solo se desideri isolare il tuo server nel vRack (rete privata) o, al contrario, rimuoverlo da uno o più VLAN. +>> > +>> +>> Per rimuovere un'interfaccia di rete privata, nella colonna `Actions`, clicca sulla freccia per accedere alle azioni possibili sull'istanza. Clicca quindi su `Detach Interface`{.action}: +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Seleziona l'interfaccia da eliminare e conferma: +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> Dalla CLI OpenStack +>> **Recupero delle informazioni necessarie** +>> +>> Individuazione delle tue istanze: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+----------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+----------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | La-mia-istanza | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MonVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+----------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+----------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+----------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | La-mia-istanza | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MonVrack=192.168.0.124 | +>> +--------------------------------------+----------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Individuazione delle reti pubbliche e private: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MioVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MioVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> o +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MioVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MioVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Dovrai annotare gli ID delle reti che ti interessano: +>> > +>> > - Ext-Net per ottenere un IP pubblico. +>> > - Quello del o dei VLAN necessari alla tua configurazione. +>> > +>> +>> **Aggiunta di un'interfaccia di rete privata** +>> +>> Per collegare una nuova interfaccia, puoi effettuare il seguente comando: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Ad esempio: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> Puoi verificare che l'azione sia stata correttamente eseguita: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => il tuo IP pubblico +>> | MioVLAN-42 network | 192.168.0.x | => il tuo IP privato +>> [...] +>> ``` +>> +>> o +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MioVLAN-42=192.168.0.x | => il tuo IP pubblico ; il tuo IP privato +>> [...] +>> ``` +>> + +### Rimozione di un'interfaccia di rete > [!warning] -> La configurazione di questa nuova interfaccia è raramente automatica. -> Sarà quindi necessario configurarla in DHCP o IP Fisso secondo la tua infrastruttura. +> Rimuovere un'interfaccia di rete ne comporta l'eliminazione immediata. +> +> Tuttavia, è importante notare che se rimuovi l'interfaccia "Ext-Net" (IP pubblico), tale indirizzo verrebbe rilasciato e rimesso in circolazione. Non potresti quindi riassegnartelo.
+> Questa azione va effettuata solo se desideri isolare il tuo server nel vRack (rete privata) o, al contrario, rimuoverlo da uno o più VLAN. > -#### Dallo Spazio Cliente OVHcloud - -Accedi allo [Spazio Cliente OVHcloud](/links/manager) poi clicca sul `Public Cloud`{.action} e seleziona il tuo progetto in alto a sinistra. - -Clicca su `Istanze`{.action} nel menu a sinistra e poi su `...`{.action} a destra dell'istanza corrispondente. Seleziona `Dettagli dell'istanza`{.action}. - -![detail instance](images/instance_details.png){.thumbnail} - -Verrà aperto il dashboard dell'istanza. Cliccate su `...`{.action} accanto a "Reti private" e selezionate `Associa una rete`{.action}. - -![collegare rete](images/vrack2021-01.png){.thumbnail} - -Nel pop-up che appare, seleziona la rete o le reti private da associare alla tua istanza e clicca su `Associa`{.action}. - -![collegare rete](images/vrack9.png){.thumbnail} - -#### Gestione delle interfacce di rete con le APIv6 OVHcloud - -Clicca [qui](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) (EN), per consultare la guida specifica a questo metodo. - -#### Gestione delle interfacce di rete con OpenStack Horizon - -Accedi all'interfaccia [Horizon](https://horizon.cloud.ovh.net/auth/login/) utilizzando il metodo indicato nella [prima parte di questa guida](./#interfaccia-horizon). - -Accedi alla tua zona di lavoro: - -![connessione Horizon](images/horizon1.png){.thumbnail} - -Clicca su `Compute` e poi su `Instances`: - -![Horizon compute istanze](images/horizon2.png){.thumbnail} - -**Aggiunta di un'interfaccia privata** - -Per aggiungere un'interfaccia, clicca sulla freccia che permette di accedere alle azioni sull'istanza. Clicca su `Attach Interface`{.action}: - -![Horizon attach interfaccia](images/horizon3.png){.thumbnail} - -Seleziona la tua interfaccia e conferma: +Per rimuovere un'interfaccia di rete, avrai prima bisogno di identificare la porta Neutron che sarà stata creata. -![Horizon attach interfaccia](images/horizon4.png){.thumbnail} +Per farlo, puoi utilizzare i seguenti comandi: -> [!primary] -> La tua istanza OVHcloud disporrà quindi di una nuova interfaccia di rete oltre all'interfaccia pubblica (Ext-net). ->
Nel riepilogo dell'istanza puoi vedere l'indirizzo IP privato assegnato automaticamente alla tua interfaccia. ->
A vostro carico, configurare la vostra interfaccia tramite il DHCP o utilizzare i vostri IP tramite una configurazione in IP statico. -> +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` -**Scollega un’interfaccia di rete** +o + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -> [!warning] -> Scollega un'interfaccia di rete e la rimuove immediatamente. -> -> È importante notare che se scollegi l'interfaccia "Ext-Net" (IP pubblico), questo indirizzo verrebbe rilasciato e reimmesso in circolazione. e non può essere riassegnata. ->
Questa operazione è necessaria solo se vuoi isolare il tuo server nella vRack (rete privata) o in caso contrario estrarlo da una o più VLAN. -> +Una volta identificato il porto da eliminare, è possibile eseguire il comando seguente: -Per scollegare un’interfaccia di rete privata, nella colonna "Actions" clicca sulla freccia che consente di accedere alle azioni possibili sull’istanza. Clicca su `Detach Interface`{.action}: +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Per esempio: -Seleziona l'interfaccia da eliminare e conferma: +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +/// ## Per saperne di più -[Configurazione della vRack Public Cloud da APIv6 OVHcloud](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) (EN) - -[Server dedicati - Creare due o più VLAN nella vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +[Server dedicati - Creare più VLAN nel vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) -Se avete bisogno di formazione o di assistenza tecnica per implementare le nostre soluzioni, contattate il vostro rappresentante o cliccate su [questo link](/links/professional-services) per ottenere un preventivo e richiedere un'analisi personalizzata del vostro progetto da parte dei nostri esperti del team Professional Services. +Se hai bisogno di formazione o di un supporto tecnico per l'implementazione delle nostre soluzioni, contatta il tuo account manager o clicca su [questo link](/links/professional-services) per richiedere un preventivo e un'analisi personalizzata del tuo progetto ai nostri esperti del team Professional Services. -Contatta la nostra [Community di utenti](/links/community). +Contatta la nostra [Community di utenti](/links/community). \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.pl-pl.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.pl-pl.md index fa76f07b93f..5070a365139 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.pl-pl.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.pl-pl.md @@ -1,14 +1,28 @@ --- title: 'Konfiguracja vRack dla Public Cloud' excerpt: 'Dowiedz się, jak skonfigurować usługę vRack dla instancji Public Cloud' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Wprowadzenie -Usługa [vRack](/links/network/vrack) to prywatna sieć, która umożliwia klientom kierowanie ruchu między serwerami dedykowanymi OVHcloud i innymi usługami OVHcloud. Umożliwia on również dodawanie [instancji Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps) do sieci prywatnej w celu utworzenia infrastruktury zasobów fizycznych i wirtualnych. +[OVHcloud vRack](/links/network/vrack) to rozwiązanie prywatnej sieci, które umożliwia naszym klientom przekazywanie ruchu między Serwerami dedykowanymi OVHcloud, a także innymi usługami OVHcloud. W tym samym czasie pozwala na dodawanie instancji [Public Cloud](/links/public-cloud/Compute) do prywatnej sieci, tworząc infrastrukturę zasobów fizycznych i wirtualnych. -**Dowiedz się, jak skonfigurować instancje Public Cloud w ramach sieci vRack.** +**Ten przewodnik wyjaśnia, jak skonfigurować instancje Public Cloud w ramach swojego vRacka.** ## Wymagania początkowe @@ -19,318 +33,1166 @@ Usługa [vRack](/links/network/vrack) to prywatna sieć, która umożliwia klien ## Interfejsy -Tworzenie sieci vRack lub dodawanie instancji do sieci odbywa się przy użyciu Panelu klienta, APIv6 OVHcloud, API OpenStack, interfejsu Horizon lub Terraform. +Tworzenie vRacka lub dodawanie instancji do sieci można wykonać za pomocą Panelu klienta OVHcloud, APIv6 OVHcloud, API OpenStack, interfejsu Horizon lub Terraform. -W zależności od profilu technicznego i Twoich potrzeb, do Ciebie należy wybór interfejsu lub metody. Poniższe instrukcje opisują niezbędne etapy dla każdej opcji. +W zależności od Twojego profilu technicznego i potrzeb, wybór interfejsu lub metody należy do Ciebie. Dla każdej opcji poniższe instrukcje opisują niezbędne kroki. -**W pierwszym kroku poniżej zamieszczono krótki opis możliwych operacji zgodnie z wybraną metodą/interfejsem.** +**Na początek poniżej przedstawiono krótki opis możliwych działań w zależności od wybranej metody/interfejsu.** -### Panel klienta OVHcloud +/// details | Panelu klienta OVHcloud -[Panel klienta OVHcloud](/links/manager) jest to interfejs całkowicie i wyłącznie wizualny, dzięki czemu idealnie nadaje się do zarządzania wieloma sieciami VLAN. Możesz również spersonalizować zakres prywatnych adresów IP, które domyślnie to 10.x.x.x/16. +[Panelu klienta OVHcloud](/links/manager) to w pełni wizualny interfejs, idealnie nadający się do zarządzania wieloma VLAN. Będziesz również miał możliwość dostosowania prywatnego zakresu adresów IP, który domyślnie znajduje się w 10.1.0.0/16. -Sieci VLAN zostaną wdrożone w wybranym regionie. Będziesz mógł również włączyć bramy, włączyć dystrybucje DHCP, itp. +VLAN zostanie wdrożony w wybranej Regionie. Będziesz również miał możliwość aktywowania bram lub nie, włączania dystrybucji DHCP itp. -Płatności za usługi możesz również zarządzać w Panelu klienta. +Zarządzanie rachunkami za swoje usługi również możesz wykonać w Panelu klienta OVHcloud. -### Interfejs Horizon +/// -Interfejs [Horizon](https://horizon.cloud.ovh.net/auth/login/) (niezależny od OVHcloud) jest oryginalną implementacją dashboardu OpenStack, który udostępnia interfejs użytkownika www dla usług OpenStack, w tym Nova, Swift, Keystone, itp. + -Ten wielofunkcyjny interfejs techniczny pozwala na zarządzanie prawie wszystkimi operacjami OpenStack. Jest to jeden z niezbędnych interfejsów, jeśli potrzebujesz zarządzać więcej niż dwoma sieciami VLAN, dodawać prywatne interfejsy sieciowe do instancji, zarządzać obrazami dostosowanymi do Twoich potrzeb, itp. +/// details | Horizon -Zapoznaj się z następującą [instrukcją](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon), aby zapoznać się z Horizon. +Interfejs [Horizon](https://horizon.cloud.ovh.net/auth/login/) (niezależny od OVHcloud) to oryginalna implementacja pulpitu OpenStack, który zapewnia interfejs użytkownika sieci web do usług OpenStack, w tym Nova, Swift, Keystone itp. + +Ten wielofunkcyjny, techniczny interfejs pozwala zarządzać prawie wszystkimi działaniami OpenStack. Jest to jeden z niezbędnych interfejsów, jeśli musisz zarządzać więcej niż dwiema VLANS, dodawać prywatne interfejsy sieciowe do swoich instancji, zarządzać niestandardowymi obrazami itp. + +Zwróć się do [tego przewodnika](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon), aby zapoznać się z Horizon. > [!primary] -> Horizon działa w danej strefie. Dlatego też należy pamiętać o wyborze logicznej (geograficznej) strefy roboczej w lewym górnym rogu interfejsu (GRA5, SBG3, BHS1 itp.). +> Horizon działa w obrębie strefy, dlatego musisz pamiętać, aby wybrać swoją logiczną (geograficzną) strefę pracy w lewym górnym rogu swojego interfejsu (GRA5, SBG3, BHS1 itp.). > -### APIv6 OVHcloud +/// + +/// details | APIv6 OVHcloud -Każde działanie podejmowane w Panelu klienta OVHcloud można wywołać za pomocą interfejsu [APIv6 OVHcloud](/links/api). Oferuje on nawet więcej możliwości niż interfejs graficzny. +Każde działanie, które wykonujesz w Panelu klienta OVHcloud, można wywołać za pomocą [APIv6 OVHcloud](/links/api). +Oferuje on nawet więcej możliwości niż interfejs graficzny. -Interfejs API jest mniej wizualny niż Panel klienta OVHcloud, ale pozwala na wykonanie dużej liczby operacji. Możesz zarządzać i dostosowywać VLAN, dodawać interfejsy do instancji lub tworzyć wysoko spersonalizowane serwery. +Interfejs API jest mniej wizualny niż Panelu klienta OVHcloud, ale pozwala wykonać dużą liczbę działań. Możesz zarządzać i dostosowywać swoje VLAN, dodawać interfejsy do swoich instancji lub tworzyć bardzo niestandardowe serwery. -Możesz po prostu uzyskać do niej dostęp z [naszej strony internetowej](/links/api), ale również wykorzystać go do tworzenia skryptów PHP lub Python. Dzięki temu możesz swobodnie automatyzować podstawowe zadania za pomocą skryptów, zoptymalizować własne funkcje i wiele więcej. +Możesz łatwo uzyskać do niego dostęp z [naszej strony internetowej](/links/api), ale także używać go do tworzenia swoich skryptów PHP lub Python. -Przed użyciem niektórych wywołań API może być konieczne pobranie różnych informacji, ponieważ wymagane jest wprowadzenie określonych danych. +W ten sposób możesz swobodnie automatyzować podstawowe zadania za pomocą skryptów, zoptymalizować własne funkcje i wiele innych. -Zobacz przewodnik [Pierwsze kroki z API OVHcloud](/pages/manage_and_operate/api/first-steps), aby rozpocząć korzystanie z interfejsu APIv6 OVHcloud. +Możesz musieć pobrać różne informacje przed użyciem niektórych wywołań API, ponieważ wymagane jest określone wejście. -### API OpenStack +Zwróć się do [tego przewodnika](/pages/manage_and_operate/api/first-steps), aby rozpocząć pracę z APIv6 OVHcloud. -Usługami Public Cloud można zarządzać za pomocą wierszy poleceń Linux lub Windows po pobraniu i zainstalowaniu narzędzi OpenStack. +/// -Aby skorzystać z tej możliwości, konieczna jest odpowiednia wiedza z zakresu systemu Linux lub Windows. Korzystaj jednak z całej mocy OpenStack. +/// details | API OpenStack -W zależności od warstwy, którą chcesz zarządzać, użyj klienta **Nova** (Compute), **Neutron** (sieć), **Glance** (obraz) lub **Swift** (object storage). Najnowszy dodatek do tego asortymentu, klient OpenStack, umożliwia bezpośrednie zarządzanie prawie wszystkimi warstwami OpenStack. +Usługi Public Cloud można zarządzać za pomocą linii poleceń Linuxa lub Windowsa po pobraniu i zainstalowaniu narzędzi OpenStack. -Dzięki API OpenStack możesz również w prosty sposób zautomatyzować zarządzanie usługami za pomocą skryptów. +Ta metoda wymaga dobrej znajomości Linuxa lub Windowsa, aby z niej korzystać, ale umożliwia wykorzystanie całej mocy OpenStack. -Aby uzyskać więcej informacji na temat korzystania z API OpenStack, zapoznaj się z następującymi przewodnikami: +W zależności od warstwy, którą chcesz zarządzać, musisz użyć klienta Nova (Compute), Neutron (sieć), Glance (obraz) lub Swift (Object Storage). Najnowszy dodatek do tej oferty, klient OpenStack, umożliwia zarządzanie prawie wszystkimi warstwami OpenStack bezpośrednio. + +Za pomocą API OpenStack możesz również łatwo automatyzować to zarządzanie za pomocą swoich skryptów. + +Aby dowiedzieć się więcej na temat użycia API OpenStack, zapoznaj się z poniższymi przewodnikami: - [Przygotowanie środowiska do korzystania z API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) -- [Zmienne środowiskowe OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) +- [Zmienne środowiskowe OpenStac](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) -Następnie, w razie potrzeby, będziesz mógł korzystać z API dedykowanych dla OpenStack: +Następnie będziesz mógł korzystać z API dedykowanych OpenStack zgodnie z potrzebami: -- Nova (compute) +- Nova (Compute) - Glance (obraz) - Cinder (obraz) - Neutron (sieć) > [!primary] -> W niektórych przypadkach korzystanie z interfejsów API OpenStack będzie łatwiejsze, a w innych łatwiejsze, Nova, Neutron, itp. +> W niektórych przypadkach łatwiej będzie użyć API OpenStack, a w innych Nova, Neutron itp. > -> Ponadto w API OpenStack może brakować niektórych funkcji w zależności od wersji klienta i systemu operacyjnego. -Niniejszy przewodnik prezentuje najprostsze i najbardziej intuicyjne opcje. -Możesz zapoznać się z [oficjalną dokumentacją OpenStack](https://docs.openstack.org/), jeśli chcesz dowiedzieć się więcej o jej używaniu. +> Ponadto niektóre funkcje mogą być niedostępne w API OpenStack w zależności od wersji klienta i systemu operacyjnego. +> W celu zwiększenia dostępności tego przewodnika przedstawiono najprostsze i najbardziej intuicyjne opcje. +> Jeśli chcesz zgłębić jego zastosowanie, możesz zapoznać się z [oficjalną dokumentacją OpenStack](https://docs.openstack.org/). > -Więcej informacji znajdziesz w przewodniku: [Konfiguracja Public Cloud vRack przy użyciu OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). - -### Terraform - -Terraform umożliwia również zarządzanie infrastrukturą OVHcloud. - -W tym celu należy wybrać właściwego dostawcę terraform i zasobów. Więcej informacji zawiera przewodnik [używanie Terraform z OVHcloud (EN)](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). - -## W praktyce - -### Etap 1: Aktywacja i zarządzanie usługą vRack - -#### W Panelu klienta OVHcloud - -> [!primary] -> Nie dotyczy to nowo utworzonych projektów, które są teraz automatycznie dostarczane z siecią vRack. Aby wyświetlić sieć vRack po utworzeniu projektu, przejdź do menu `Network`{.action} w zakładce po lewej stronie. Kliknij opcję `Prywatna sieć vRack`{.action}, aby wyświetlić sieć(e) vRack(s). -> - -Jeśli posiadasz starszy projekt, ale nie posiadasz usługi vRack, musisz zamówić usługę. Ten produkt jest bezpłatny, a jego udostępnienie zajmuje tylko kilka minut. - -W menu po lewej stronie ekranu kliknij przycisk `Dodaj usługę`{.action} (ikona koszyka). Użyj filtru u u góry strony lub przewiń w dół, aby znaleźć usługę `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} - -Zostaniesz przekierowany na inną stronę, aby zatwierdzić zamówienie. Operacja potrwa kilka minut. - -Po uaktywnieniu usługi odnajdziesz ją w Panelu klienta w sekcji `Network`{.action} > `Prywatna sieć vRack`{.action}. Pod nazwą "pn-xxxxxx". - -Na liście dostępnych usług zaznacz projekt, który chcesz dodać do szafy vRack i kliknij na przycisk `Dodaj`{.action}. +/// -![Dodaj projekt](images/addprojectvrack.png){.thumbnail} +/// details | CLI OpenStack -Aby kontynuować konfigurację vRack, przejdź do sekcji [Tworzenie sieci prywatnej w Panelu klienta OVHcloud](./#tworzenie-sieci-prywatnej-w-panelu-klienta-ovhcloud) niniejszego przewodnika. +Możesz zarządzać swoimi usługami Public Cloud OVHcloud i vRackami bezpośrednio z terminala Linuxa lub Windowsa za pomocą CLI OpenStack. -#### Za pomocą APIv6 OVHcloud +Ten interfejs umożliwia zarządzanie wszystkimi warstwami OpenStack: -Aby włączyć i zarządzać usługą vRack za pomocą interfejsu APIv6 OVHcloud, zapoznaj się z [tą częścią](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) (EN), odpowiedniego przewodnika. +- Nova: instancje (Compute) +- Neutron: sieci +- Glance: obrazy +- Cinder: woluminy -### Etap 2: Tworzenie sieci prywatnej w ramach usługi vRack +CLI centralizuje te funkcje i może być zintegrowany ze swoimi skryptami, aby automatyzować swoje zadania. -Należy utworzyć prywatną sieć z lokalną siecią wirtualną (VLAN), aby instancje podłączone do sieci vRack mogły komunikować się między sobą. +Przed rozpoczęciem zapoznaj się z poniższymi przewodnikami: -Dzięki usłudze Public Cloud możesz utworzyć aż do 4 000 sieci VLAN w ramach jednej usługi vRack. Dzięki temu każdy prywatny adres IP może być wykorzystany maksymalnie 4 000 razy. -Na przykład adres 192.168.0.10 sieci VLAN 2 różni się od adresu IP 192.168.0.10 sieci VLAN 42. -Rozwiązanie to może być przydatne do segmentacji usługi vRack na kilka wirtualnych sieci. - -W Panelu klienta OVHcloud możesz przypisać wybraną sieć VLAN, ale nie możesz spersonalizować zakresu adresów IP. Usługa vRack zostanie włączona we wszystkich strefach. - -W Panelu klienta OVHcloud możesz przypisać wybraną sieć VLAN i spersonalizować zakres prywatnych adresów IP. +- [Przygotowanie środowiska do korzystania z API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Zmienne środowiskowe OpenStac](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> Na serwerach dedykowanych używasz domyślnie sieci VLAN 0. Infrastruktura OpenStack wymaga podania identyfikatora VLAN bezpośrednio na poziomie infrastruktury. -> -> W przeciwieństwie do serwerów dedykowanych nie trzeba oznaczać sieci VLAN bezpośrednio na instancji Public Cloud. -> -> Więcej informacji na ten temat zawiera przewodnik [Tworzenie kilku sieci VLAN w prywatnej sieci vRack.](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) - -> [!warning] -> Usługą vRack zarządzamy na poziomie infrastruktury OVHcloud. Oznacza to, że administrowanie usługą odbywa się wyłącznie w Panelu klienta i przez APIv6. > -> Ponieważ usługa OpenStack nie jest zlokalizowana na tym samym poziomie, nie będzie możliwe personalizacja sieci VLAN za pośrednictwem interfejsu Horizon ani przez API OpenStack. +> CLI OpenStack jest przydatny do zarządzania swoim vRackiem, ale niektóre funkcje mogą się różnić w zależności od wersji klienta lub systemu operacyjnego. Zwróć się do [oficjalnej dokumentacji OpenStack](https://docs.openstack.org/). > -#### Tworzenie sieci prywatnej w Panelu klienta OVHcloud +/// -Kolejnym krokiem po utworzeniu Twojej usługi vRack jest utworzenie prywatnej sieci. +/// details | Terraform -W karcie Public Cloud kliknij `Private Network`{.action} w menu po lewej stronie, pod **Network**. +Terraform może również być używany do zarządzania infrastrukturą OVHcloud. -![Tworzenie sieci VLAN](images/vrack2022-03.png){.thumbnail} +Do tego potrzebujesz wybrać odpowiedni dostawcę i zasób terraform. Znajdziesz więcej informacji w naszym przewodniku dotyczącym [używania Terraform z OVHcloud](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -Kliknij przycisk `Utwórz prywatną sieć`{.action}. Na następnej stronie można dostosować wiele ustawień. +/// -W etapie 1 wybierz region, w którym chcesz utworzyć prywatną sieć. - -![select region](images/vrack5-2024.png){.thumbnail} - -Na następnym etapie otrzymasz kilka opcji: - -![tworzenie network](images/vrack6-2022.png){.thumbnail} - -W polu **Nazwa sieci prywatnej** podaj nazwę sieci prywatnej. - -**Utwórz Gateway i połącz się z prywatną siecią** +## W praktyce -Wybierz tę opcję, jeśli chcesz utworzyć instancje wyłącznie z siecią prywatną. Więcej informacji znajdziesz w przewodnikach: [Creating a private network with Gateway (EN)](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) i [Tworzenie pierwszej instancji Public Cloud i łączenie się z nią](/pages/public_cloud/compute/public-cloud-first-steps). +### Krok 1: Aktywowanie i zarządzanie vRackiem > [!warning] -> Jeśli opcja jest szara, oznacza to, że jest niezgodna z wybranym regionem. Więcej informacji znajduje się na stronie internetowej [dostępność produktów Public Cloud dla każdego regionu](/links/public-cloud/regions-pci). +> +> vRack jest zarządzany na poziomie infrastruktury OVHcloud, co oznacza, że możesz go administrować wyłącznie w Panelu klienta OVHcloud i w APIv6 OVHcloud. > -**Opcje sieciowe warstwy 2** - -Jeśli zostanie wybrana opcja `Wybierz ID sieci VLAN` sieci VLAN, trzeba będzie wybrać numer VLAN ID z zakresu od 0 do 4 000. - -Jeśli to pole nie zostanie zaznaczone, system przypisze losowy numer VLAN. - -Jeśli potrzebujesz komunikacji z serwerami dedykowanymi w tej sieci VLAN, zapoznaj się z przewodnikiem [Tworzenie kilku sieci VLAN w prywatnej sieci vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**Opcje dystrybucji adresów DHCP** - -Domyślny zakres DHCP to 10.0.0.0/16. Możesz skorzystać z innego wybranego zakresu prywatnego. - -Po dokonaniu wyboru kliknij przycisk `Utwórz`{.action}, aby uruchomić proces. +> [!tabs] +> Przez Panelu klienta OVHcloud +>> > [!primary] +>> > +>> > To dotyczy projektów nowo utworzonych, które są automatycznie dostarczane z vRackiem. Aby wyświetlić vRack po utworzeniu projektu, przejdź do sekcji `Sieć`{.action} i kliknij `Prywatna sieć vRack`{.action}, aby wyświetlić vRacki. +>> > +>> +>> Jeśli masz starszy projekt i nie masz vRacka, musisz go zamówić. Użycie samego vRacka jest darmowe i może być dostarczone w ciągu kilku minut. +>> +>> W menu po lewej stronie kliknij przycisk `Dodaj usługę`{.action} (ikona koszyka). Użyj filtra w górnej części strony lub przewiń w dół, aby znaleźć usługę `vRack`{.action}. +>> +>> ![Zamów vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> Zostaniesz przekierowany na inną stronę, aby potwierdzić zamówienie. Ustawienie vRacka w Twoim koncie zajmie kilka minut. +>> +>> Po aktywacji usługi znajdziesz ją w Panelu Klienta w sekcji `Sieć`{.action} > `Prywatna sieć vRack`{.action}, oznaczoną jako "pn-xxxxxx". +>> +>> Kliknij na swój vRack, a następnie wybierz projekt, który chcesz dodać do vRack z listy dostępnych usług i kliknij przycisk `Dodaj`{.action}. +>> +>> ![dodaj projekt do vrack](images/addprojectvrack.png){.thumbnail} +>> +>> Aby kontynuować konfigurowanie vRacka z Panelu klienta OVHcloud, kontynuuj czytanie tego przewodnika od [Kroku 2: Utwórz prywatną sieć w vRacku](#create-pn-in-vrack), w zakładce **Z Panelu klienta OVHcloud**. +>> +> Przez APIv6 OVHcloud +>> +>> **Krok 1: Aktywowanie i zarządzanie vRackiem** +>> +>> Zaloguj się do interfejsu APIv6 OVHcloud zgodnie z odpowiednim przewodnikiem ([Pierwsze kroki z API OVHcloud](/pages/manage_and_operate/api/first-steps)) i wykonaj następujące kroki: +>> +>> **Tworzenie koszyka** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > Ten wywołanie utworzy identyfikator dla Twojego 'koszyka'. Możesz dodać tyle artykułów, ile chcesz, zanim je potwierdzisz. +>> > +>> > W tym przypadku koszt zamówienia vRacka samodzielnie wynosi 0 zł. Pamiętaj o numerze koszyka (cartId), będzie on potrzebny w dalszych krokach. +>> > +>> +>> **Pobieranie niezbędnych informacji do zamówienia vRacka** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie pozwoli Ci pobrać wszystkie potrzebne informacje do zamówienia vRacka. Skopiuj: +>> > +>> > *cartId*, *duration*, *planCode* i *pricingMode*. +>> > +>> +>> **Dodawanie vRacka do koszyka** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie pozwala dodać vRacka do koszyka, dodając wszystkie niezbędne informacje do zamówienia. +>> > +>> > Dla vRacka będzie to na przykład: +>> > +>> > cartId: [identyfikator koszyka] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Po potwierdzeniu zamówienia otrzymasz numer elementu ("itemId"). Zachowaj tę informację, może się przydać, jeśli chcesz wprowadzić zmiany przed potwierdzeniem koszyka. +>> +>> **Potwierdzenie koszyka** +>> +>> Po dodaniu wszystkich elementów do koszyka, musisz go potwierdzić: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie potwierdzi koszyk i utworzy zamówienie ("orderId"). Zachowaj tę informację, będzie ona potrzebna do potwierdzenia zamówienia. +>> > +>> +>> **Potwierdzenie ostatecznego zamówienia** +>> +>> Aby potwierdzić zamówienie, masz dwie możliwości: +>> +>> - Przejdź przez widoczny URL, gdy koszyk zostanie potwierdzony. +>> Przykładowy URL: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Potwierdź za pomocą tego wywołania: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Nawet jeśli to zamówienie o wartości 0 zł, konieczne jest symulowanie płatności zamówienia (orderId). Twoja forma zamówienia zostanie potwierdzona i zaczną się prace nad zamówieniem. +>> > +>> +>> Po potwierdzeniu darmowego zamówienia może upłynąć kilka minut, zanim vRack zostanie aktywowany. +>> +>> **Krok 2: Dodawanie projektu Public Cloud do vRacka** +>> +>> Po aktywacji vRacka, musisz zintegrować swoje projekty Public Cloud z vRackiem. +>> +>> Zaloguj się do interfejsu APIv6 OVHcloud zgodnie z odpowiednim przewodnikiem: [Pierwsze kroki z API OVHcloud](/pages/manage_and_operate/api/first-steps). +>> +>> W przypadku nieznanej ID projektu, poniższe wywołania pozwalają je pobrać. +>> +>> **Identyfikowanie projektu** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie pobiera listę projektów. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie identyfikuje projekt za pomocą pola "description". +>> > +>> +>> **Dodawanie projektu do vRacka** +>> +>> Po uzyskaniu ID projektu i nazwy vRacka, ich powiązanie odbywa się za pomocą poniższego wywołania: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Wypełnij pola danymi wcześniej pobranymi: +>> +>> - **serviceName**: nazwa vRacka w formie "pn-xxxxxx". +>> - **project**: ID projektu Public Cloud w formie łańcucha znaków o długości 32 znaków. +>> +>> > [!primary] +>> > +>> > To wywołanie inicjuje powiązanie projektu i vRacka. Należy następnie pobrać identyfikator zadania, aby sprawdzić postęp. +>> > +>> +>> **Sprawdzanie postępu zadania** +>> +>> Możesz sprawdzić postęp zadania za pomocą tego wywołania: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie jest opcjonalne i pozwala jedynie sprawdzić status zadania. Po jego zakończeniu możesz przejść do następnego kroku. +>> > +>> + +### Krok 2: Tworzenie prywatnej sieci w vRacku + +Należy utworzyć prywatną sieć z wirtualną lokalną siecią LAN (VLAN), aby połączone instancje mogły komunikować się ze sobą. + +Z usługą Public Cloud możesz utworzyć do 4 000 VLANów w jednym vRacku. Oznacza to, że możesz używać każdego prywatnego adresu IP aż 4 000 razy. +W ten sposób np. adres 192.168.0.10 VLAN 2 jest inny niż adres 192.168.0.10 VLAN 42. + +Może to być przydatne do segmentacji vRacka między wieloma wirtualnymi sieciami. + +Z Panelu klienta OVHcloud i APIv6 OVHcloud możesz dostosować wszystkie ustawienia: tryb wdrażania i region, nazwę i ID VLAN, zakres prywatnych adresów IP (np. 10.0.0.0/16), DHCP i bramę. > [!primary] -> Utworzenie prywatnej sieci może zająć kilka minut. +> Na Serwerach dedykowanych domyślnie używane jest VLAN 0. Infrastruktura OpenStack wymaga bezpośredniego określenia ID VLAN na poziomie infrastruktury. > +> Na odwrót niż Serwery dedykowane, nie ma potrzeby bezpośredniego tagowania VLAN na instancji Public Cloud. +> +> Aby dowiedzieć się więcej na ten temat, skorzystaj z przewodnika "[Tworzenie wielu VLANów w vRacku](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)". -#### Tworzenie sieci prywatnej za pomocą interfejsu APIv6 OVHcloud - -Aby utworzyć sieć VLAN przy użyciu interfejsu APIv6 OVHcloud, zapoznaj się z [tą sekcją](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) (EN), odpowiedniego przewodnika. - -#### Tworzenie prywatnej sieci przy użyciu Terraform - -Należy skorzystać z usług dostawcy openstack. Przykład kompletnego skryptu terraform możesz pobrać w [to repozytorium](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -Specyficzną częścią procesu integracji rozwiązania vRack jest parametr `value_specs`. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` - -### Etap 3: Integracja instancji z usługą vRack +> [!warning] +> vRack jest zarządzany na poziomie infrastruktury OVHcloud, co oznacza, że możesz go administrować wyłącznie w Panelu klienta OVHcloud i w APIv6 OVHcloud. +> +> Ponieważ OpenStack nie znajduje się na tym samym poziomie, nie będziesz mógł dostosować VLANów przez interfejs Horizon lub API OpenStack. +> -Możliwe są dwa scenariusze: +> [!tabs] +> Przez Panelu klienta OVHcloud +>> Po przygotowaniu vRacka następnym krokiem jest utworzenie prywatnej sieci. +>> +>> W zakładce `Public Cloud` kliknij `Private Network`{.action} w menu po lewej stronie pod **Sieć**. +>> +>> ![Tworzenie VLAN](images/vrack2022-03.png){.thumbnail} +>> +>> Kliknij przycisk `Utwórz prywatną sieć`{.action}. Ta strona pozwala dostosować wiele ustawień. +>> +>> Na początek wybierz tryb wdrażania i region, w którym chcesz utworzyć prywatną sieć. +>> +>> ![Wybierz region](images/vrack5-2024.png){.thumbnail} +>> +>> W następnym kroku przedstawione są różne Opcje: +>> +>> ![Tworzenie sieci](images/vrack6-2022.png){.thumbnail} +>> +>> W polu **Nazwa prywatnej sieci** ustaw nazwę swojej prywatnej sieci. +>> +>> **Opcja sieciowa warstwy 2** +>> +>> Jeśli zaznaczysz pole `Zdefiniuj ID sieci VLAN`{.action}, będziesz mógł ręcznie wybrać numer ID VLAN od 0 do 4 000. +>> +>> Jeśli nie zaznaczysz pola, system przypisze losowy numer ID VLAN do Twojej prywatnej sieci. +>> +>> Jeśli chcesz móc komunikować się z Serwerami dedykowanymi w tym VLAN, zapoznaj się z przewodnikiem: [Tworzenie wielu VLANów w vRacku](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **Opcje dystrybucji adresów DHCPP** +>> +>> Domyślny zakres DHCP to 10.1.0.0/16. Możesz użyć innego prywatnego zakresu lub wyłączyć DHCP dla tej prywatnej sieci. +>> +>> **Opcje bramy sieciowej** +>> +>> - **Ustaw pierwszy adres danego CIDR jako bramę domyślną (DHCP opcja 3)**: Gdy ta opcja jest włączona, serwer DHCP ogłasza pierwszy adres w CIDR jako domyślną bramę dla maszyn podłączonych do sieci. +>> - **Przypisz Gateway i połącz się z prywatną siecią**: Wybierz tę opcję, jeśli zamierzasz tworzyć instancje z prywatną siecią. Aby uzyskać więcej informacji, zapoznaj się z poniższymi przewodnikami: [Tworzenie prywatnej sieci z bramą](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) i [Tworzenie i łączenie się ze swoją pierwszą instancją Public Cloud](/pages/public_cloud/Compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > Jeśli druga opcja jest z灰色, oznacza to, że wybrany region nie obsługuje jej. Aby uzyskać więcej informacji, zapoznaj się z naszą stroną [dostępność regionów](/links/public-cloud/regions-pci). +>> > +>> +>> Po zakończeniu kliknij `Skonfiguruj prywatną sieć`{.action}, aby rozpocząć proces. +>> +>> > [!primary] +>> > +>> > Tworzenie prywatnej sieci może zająć kilka minut. +>> > +>> +> Przez APIv6 OVHcloud +>> +>> Po zalogowaniu się do [interfejsu APIv6 OVHcloud](/links/api), wykonaj poniższe kroki: +>> +>> **Krok 1: Pobieranie wymaganych informacji** +>> +>> **Projekt Public Cloud** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie pobiera listę projektów. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie identyfikuje projekt za pomocą pola "description". +>> > +>> +>> **vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > W polu "serviceName" podaj ID swojego projektu. Zapisz informacje o ID vRacka w formie "pn-xxxxx". +>> > +>> +>> **Krok 2: Tworzenie prywatnej sieci** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Wypełnij pola danymi wcześniej uzyskanymi: +>> > +>> > - **serviceName**: ID projektu. +>> > - **name**: nazwa VLAN. +>> > +>> > Możesz pozostawić pole "Region" puste, aby włączyć go dla wszystkich regionów. +>> > +>> > Identyfikator VLAN (vlanId) jest wymagany, jeśli chcesz utworzyć konkretny VLAN. +>> > +>> +>> Tworzenie zajmie kilka chwil. +>> +>> Informacje o VLAN-ie możesz sprawdzić za pomocą następującego wywołania: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > To wywołanie zwraca "networkId" w następującym formacie: name-vrack_vlanId. +>> > +>> > Na przykład VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Krok 3: Tworzenie podsieci** +>> +>> Domyślnie, jeśli nie dodasz podsieci, używany zakres adresów IP to: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> Jeśli chcesz samodzielnie zarządzać przydziałem adresów IP, musisz utworzyć podsieć. +>> +>> Aby to zrobić, po utworzeniu VLAN-u należy utworzyć podsieć dla każdego odpowiedniego regionu za pomocą następującego wywołania: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Wypełnij pola zgodnie z poniższą tabelą. +>> +>> | Pole | Opis | +>> | ----------- | ----------------------------------------------------------------------------------------------- | +>> | serviceName | Identyfikator projektu. | +>> | networkId | Identyfikator Twojej sieci, uzyskany w poprzednich krokach. Przykład: pn-xxxxxx_42 dla VLAN 42. | +>> | dhcp | Pole wyboru umożliwiające włączenie / wyłączenie DHCP w VLAN-ie. | +>> | end | Ostatni adres podsieci w tym regionie. Przykład: 192.168.1.50. | +>> | network | Blok adresów IP podsieci. Przykład: 192.168.1.0/24. | +>> | region | Przykład: SBG3. | +>> | start | Pierwszy adres podsieci w tym regionie. Przykład: 192.168.1.15. | +>> +>> > [!primary] +>> > Na tym etapie tworzona jest podsieć dla danego regionu. Możesz dynamicznie włączać lub wyłączać przypisywanie prywatnych adresów IP za pomocą DHCP. +>> > +>> > Należy wykonać tę samą operację dla każdego regionu, w którym znajdują się Twoje instancje. +>> > +>> +>> > [!warning] +>> > +>> > Pamiętaj, aby rozdzielić pule adresów IP dla różnych regionów. Na przykład: +>> > +>> > - Od 192.168.0.2 do 192.168.0.254 dla SBG1. +>> > - Od 192.168.1.2 do 192.168.1.254 dla GRA1. +>> +> Przez Terraform +>> +>> W Terraform należy użyć providera OpenStack. Przykładowy kompletny skrypt Terraform możesz pobrać z [tego repozytorium GitHub](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> Częścią specyficzną dla OVHcloud w integracji z vRackiem jest parametr `value_specs`. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> Przez OpenStack CLI +>> W poniższym przykładzie określamy `VLAN_ID`, do którego ma należeć sieć, za pomocą parametrów `--provider-network-type` oraz `--provider-segment`. +>> +>> Możesz usunąć te parametry. W takim przypadku zostanie użyty dostępny `VLAN_ID`. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> + +### Krok 3: Integracja instancji z vRackiem + +Istnieją dwa możliwe scenariusze: - Instancja, która ma zostać zintegrowana, jeszcze nie istnieje. -- Istniejąca instancja musi zostać dodana do sieci vRack. - -**W przypadku nowej instancji** - -#### W Panelu klienta OVHcloud - -Jeśli potrzebujesz pomocy, zapoznaj się z tym przewodnikiem: [Tworzenie instancji](/pages/public_cloud/compute/public-cloud-first-steps) Podczas tworzenia instancji w etapie 5 możesz wybrać tryb sieci, a następnie prywatną sieć, do której chcesz zintegrować instancję. - -![przypisz nową instancję](images/network-selection.png){.thumbnail} +- Istniejąca instancja musi zostać dodana do vRacka. + +/// details | **W przypadku nowej instancji** + +> [!tabs] +> Przez Panelu klienta OVHcloud +>> Jeśli potrzebujesz pomocy, najpierw przejrzyj ten przewodnik: [Tworzenie instancji w Panelu klienta OVHcloud](/pages/public_cloud/Compute/public-cloud-first-steps). Przy tworzeniu instancji możesz wybrać, w kroku 5, tryb sieciowy, a następnie prywatną sieć, do której chcesz dołączyć swoją instancję. +>> +>> ![dołączenie nowej instancji](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > Możesz połączyć swoją instancję z **tylko jednym** vRackiem za pomocą Panelu klienta OVHcloud. +>> > +>> > Aby dodać wiele interfejsów, musisz przejść przez API OpenStack lub Horizon. +>> > +>> +> Przez APIv6 OVHcloud +>> Po zalogowaniu się do [interfejsu APIv6 OVHcloud](/links/api), wykonaj poniższe kroki: +>> +>> **Krok 1: Pobranie wymaganych informacji** +>> +>> **Pobranie identyfikatora projektu** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Pobranie identyfikatora sieci publicznej (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Pobranie identyfikatora sieci prywatnej (vRack interfejsu wcześniej utworzonego)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Identyfikator będzie miał postać: "pn-xxxxx_yy", gdzie yy to numer VLAN. +>> > +>> +>> **Pobranie identyfikatora wybranego typu instancji (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > Możesz ograniczyć listę, określając region tworzenia instancji. +>> > +>> +>> **Pobranie identyfikatora wybranego obrazu (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > Możesz ograniczyć listę, określając region tworzenia instancji. +>> > +>> +>> **Pobranie identyfikatora wybranego klucza SSH (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> Jeśli jeszcze nie dodałeś klucza SSH do Panelu klienta OVHcloud, możesz to zrobić za pomocą poniższego wywołania: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> ***Wdrożenie instancji** +>> +>> Po zebraniu wszystkich elementów koniecznych do wdrożenia, możesz użyć poniższego wywołania: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> Musisz wypełnić co najmniej następujące pola: +>> +>> |Pole|Opis| +>> |---|---| +>> |serviceName|ID projektu Public Cloud.| +>> |flavorId|ID typu instancji (np. D2-2, B2-7, WIN-R2-15 itp.).| +>> |imageId|ID obrazu do wdrożenia (np. Debian 9, Centos 7 itp.).| +>> |name|Nazwa dla swojej instancji.| +>> |networks|W sekcji "networkId" podaj identyfikator sieci publicznej (Ext-Net) lub swojego VLAN (pn-xxxxxx_yy). Możesz kliknąć przycisk "+" aby dodać więcej sieci.| +>> |region|Region wdrożenia instancji (np. GRA5).| +>> |sshKeyId|ID klucza SSH OpenStack.| +>> +>> Po wykonaniu wywołania, jeśli wszystkie informacje są poprawnie wypełnione, instancja zostanie utworzona z jednym lub więcej interfejsami sieciowymi. +>> +>> > [!warning] +>> > +>> > W zależności od systemów operacyjnych, będziesz musiał ręcznie skonfigurować swoje prywatne interfejsy sieciowe, aby były one rozpoznawane.
+>> > Ponieważ OpenStack nie potrafi prioryzować publicznego interfejsu w porównaniu do interfejsu vRacka, interfejs vRacka może czasem być uznawany za domyślną trasę.
+>> > Prostym skutkiem tego jest to, że instancja staje się niedostępna z publicznego IP.
+>> > Jednym z rozwiązań może być ponowne uruchomienie instancji z Panelu sterowania.
+>> > Inna opcja to połączenie się z instancją przez inny serwer w tej samej prywatnej sieci. Możesz również poprawić konfigurację sieciową instancji za pomocą trybu Ratunkowego. +>> > +>> +> Przez OpenStack CLI +>> Poniższe kroki są konieczne do utworzenia instancji bezpośrednio w vRacku. +>> +>> **Pobranie wymaganych informacji** +>> +>> Sieci publiczne i prywatne: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> lub +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Musisz zanotować identyfikatory sieci, które Cię interesują: +>> > +>> > - Ext-Net dla adresu IP publicznego. +>> > - VLAN(y), które są wymagane dla Twojej konfiguracji. +>> > +>> +>> Zanotuj również informacje opisane w [przewodniku użytkownika API Nova](/pages/public_cloud/Compute/starting_with_nova): +>> +>> - ID lub nazwę klucza SSH OpenStack. +>> - ID typu instancji (flavor). +>> - ID wybranego obrazu (system operacyjny, snapshot itp.). +>> +>> **Wdrożenie instancji** +>> +>> Z wcześniej zebranymi elementami, instancję można utworzyć, w tym bezpośrednio w vRacku: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Przykład: +>> +>> ```bash +>> nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> lub +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance name] +>> ``` +>> +>> Przykład: +>> +>> ```bash +>> openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NameOfInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Name of key] | +>> | metadata | {} | +>> | name | [Name of instance] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> Możesz ustawić adres IP instancji swojego interfejsu vRacka na poziomie OpenStack. +>> +>> Aby to zrobić, możesz dodać pojedynczy argument do funkcji "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Przykład: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Weryfikacja instancji** +>> +>> Po kilku chwilach możesz sprawdzić listę istniejących instancji, aby znaleźć serwer, który utworzyłeś: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | +>> +--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **W przypadku istniejącej instancji** + +Panelu klienta OVHcloud pozwala dołączyć instancję do jednej lub więcej prywatnych sieci, ale nie oferuje zaawansowanej konfiguracji interfejsów sieciowych. Jeśli chcesz dalej dostosować ustawienia, będziesz musiał zarządzać nimi za pomocą APIv6 OVHcloud, przez OpenStack API lub za pomocą Horizon. + +Wymagana akcja polega po prostu na dodaniu nowego interfejsu sieciowego do swojego serwera, oprócz istniejącego. + +Na przykład, jeśli masz publiczny interfejs *eth0*, dodasz interfejs *eth1*. > [!warning] -> W Panelu klienta OVHcloud będzie można podłączyć instancję **tylko do jednej** sieci vRack. -> Aby dodać kilka interfejsów, przejdź przez API OpenStack lub Horizon. +> Konfiguracja tego nowego interfejsu rzadko jest automatyczna. +> Musisz więc ustawić statyczny adres IP lub skonfigurować DHCP, w zależności od infrastruktury. > -#### Za pomocą APIv6 OVHcloud - -Przejdź do [tej sekcji](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) (EN), odpowiedniego przewodnika. - -**W przypadku istniejącej instancji** - -Panel klienta OVHcloud umożliwia przypisanie instancji do jednej lub kilku prywatnych sieci, ale nie oferuje zaawansowanej konfiguracji interfejsu sieciowego. Aby jeszcze bardziej spersonalizować infrastrukturę, należy zarządzać nią za pośrednictwem interfejsu APIv6 OVHcloud, API OpenStack lub Horizon. - -Operacja, którą należy przeprowadzić, polega na dodaniu do Twojego serwera nowego interfejsu sieciowego, obok interfejsu już istniejącego. - -Na przykład, jeśli masz interfejs publiczny *eth0*, dodasz interfejs *eth1*. +> [!tabs] +> Przez Panelu klienta OVHcloud +>> Zaloguj się do [Panelu klienta OVHcloud](/links/manager), przejdź do sekcji `Public Cloud`{.action} i wybierz odpowiedni projekt Public Cloud. +>> +>> Kliknij `Instancje`{.action} w lewym pasku nawigacyjnym, a następnie `⁝`{.action} po prawej stronie instancji. Wybierz `Dane dotyczące instancji`{.action}. +>> +>> ![szczegóły instancji](images/instance_details.png){.thumbnail} +>> +>> Otworzy się pulpit instancji. Kliknij przycisk `⁝`{.action} w oknie "Sieć", obok "Sieci prywatne", i wybierz `Przypisz sieć`{.action}. +>> +>> ![dołącz sieć](images/vrack2021-01.png){.thumbnail} +>> +>> W oknie dialogowym, które się pojawi, wybierz prywatną sieć (siec(y)) do dołączenia do swojej instancji i kliknij `Zatwierdź`{.action}. +>> +>> ![dołącz sieć](images/vrack9.png){.thumbnail} +>> +> Przez APIv6 OVHcloud +>> +>> Jeśli chcesz zintegrować istniejącą instancję z vRackiem, nie da się tego zrobić z Panelu klienta OVHcloud. Musisz użyć Horizon, OpenStack API lub APIv6 OVHcloud. +>> +>> Wymagana akcja polega po prostu na dodaniu nowego interfejsu sieciowego do swojego serwera, oprócz istniejącego. +>> +>> Na przykład, jeśli masz publiczny interfejs *eth0*, dodasz interfejs *eth1*. +>> +>> > [!warning] +>> > +>> > Konfiguracja tego nowego interfejsu rzadko jest automatyczna. +>> > Musisz więc ustawić statyczny adres IP lub skonfigurować DHCP, w zależności od infrastruktury. +>> > +>> +>> **Poniższe kroki opisują, jak zarządzać interfejsami sieciowymi swoich instancji.** +>> +>> **Krok 1: Pobieranie wymaganych informacji** +>> +>> **Pobieranie identyfikatora projektu** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Pobieranie identyfikatora instancji** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Pobieranie identyfikatora sieci publicznej (Ext-Net)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Pobieranie identyfikatora sieci prywatnej (interfejs vRacka wcześniej utworzony)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Identyfikator będzie miał postać: "pn-xxxxx_yy", w której yy to numer VLAN. +>> > +>> +>> **Krok 2: Dodawanie interfejsu do instancji** +>> +>> Po zebraniu wszystkich niezbędnych elementów, możesz użyć poniższego wywołania: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> Musisz wypełnić co najmniej następujące pola: +>> +>> |Pole|Opis| +>> |---|---| +>> |serviceName|Identyfikator projektu Public Cloud.| +>> |instanceId|Identyfikator instancji.| +>> |networkId|Wprowadź identyfikator sieci publicznej (Ext-Net) lub swojego VLAN (pn-xxxxxx_yy).| +>> |ip|Zdefiniuj konkretny adres IP (działa tylko dla interfejsów prywatnych).| +>> +>> Po wykonaniu wywołania, jeśli wszystkie informacje są poprawnie wypełnione, do instancji zostanie dodany nowy interfejs. +>> +>> > [!primary] +>> > +>> > Twoja instancja OVHcloud będzie miała nowy interfejs sieciowy oprócz publicznego interfejsu (Ext-Net).
+>> > W podsumowaniu instancji możesz zobaczyć prywatny adres IP, który jest automatycznie przypisany do twojego interfejsu.
+>> > Masz odpowiedzialność za poprawne skonfigurowanie interfejsu przez DHCP lub poprzez użycie odpowiednich adresów IP w konfiguracji statycznego IP. +>> > +>> +>> **Krok 3: Usuwanie interfejsu z instancji** +>> +>> > [!warning] +>> > +>> > Odłączenie interfejsu sieciowego jest trwałe. +>> > +>> > Jednak ważne jest, aby zauważyć, że jeśli odłączysz interfejs "Ext-Net" (publiczny IP), ten adres zostanie zwolniony i ponownie wprowadzony do obiegu. Nie da się go ponownie przypisać.
+>> > Ta akcja jest wymagana tylko wtedy, gdy chcesz izolować swój serwer w vRacku (sieci prywatnej), lub jeśli chcesz usunąć go z jednej lub więcej VLAN. +>> > +>> +>> Po zebraniu wszystkich niezbędnych informacji, możesz użyć poniższego wywołania, aby usunąć interfejs: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> Musisz wypełnić co najmniej następujące pola: +>> +>> |Pole|Opis| +>> |---|---| +>> |serviceName|Identyfikator projektu Public Cloud.| +>> |instanceId|Identyfikator instancji.| +>> |networkId|Wprowadź identyfikator sieci publicznej (Ext-Net) lub swojego VLAN (pn-xxxxxx_yy).| +>> +> Przez Horizon +>> Zaloguj się do [interfejsu Horizon](https://horizon.cloud.ovh.net/auth/login/) jak wspomniano [wyżej](#horizon). +>> +>> Wybierz odpowiednią strefę pracy. +>> +>> ![połączenie Horizon](images/horizon1.png){.thumbnail} +>> +>> Wybierz `Compute` i następnie `Instances` z menu. +>> +>> ![instancje Horizon Compute](images/horizon2.png){.thumbnail} +>> +>> **Dodawanie prywatnego interfejsu** +>> +>> Aby dodać interfejs, kliknij strzałkę w kolumnie `Actions`, aby uzyskać dostęp do możliwych działań na instancji. Wybierz `Attach Interface`{.action}. +>> +>> ![dołącz interfejs Horizon](images/horizon3.png){.thumbnail} +>> +>> Wybierz swój interfejs i potwierdź. +>> +>> ![dołącz interfejs Horizon](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > Twoja instancja OVHcloud będzie miała nowy interfejs sieciowy oprócz publicznego interfejsu (Ext-Net).
+>> > W podsumowaniu instancji możesz zobaczyć prywatny adres IP, który jest automatycznie przypisany do twojego interfejsu.
+>> > Masz odpowiedzialność za poprawne skonfigurowanie interfejsu przez DHCP lub poprzez użycie odpowiednich adresów IP w konfiguracji statycznego IP. +>> > +>> +>> **Odłączanie prywatnego interfejsu sieciowego** +>> +>> > [!warning] +>> > +>> > Odłączenie interfejsu sieciowego jest trwałe. +>> > +>> > Jednak ważne jest, aby zauważyć, że jeśli odłączysz interfejs "Ext-Net" (publiczny IP), ten adres zostanie zwolniony i ponownie wprowadzony do obiegu. Nie da się go ponownie przypisać.
+>> > Ta akcja jest wymagana tylko wtedy, gdy chcesz izolować swój serwer w vRacku (sieci prywatnej), lub jeśli chcesz usunąć go z jednej lub więcej VLAN. +>> > +>> +>> Aby odłączyć prywatny interfejs, kliknij strzałkę w kolumnie `Actions`, aby uzyskać dostęp do możliwych działań na instancji. Wybierz `Detach Interface`{.action}. +>> +>> ![odłącz interfejs Horizon](images/horizon5.png){.thumbnail} +>> +>> Wybierz swój interfejs i potwierdź. +>> +>> ![odłącz interfejs Horizon](images/horizon6.png){.thumbnail} +>> +> Przez OpenStack CLI +>> Poniższe kroki są konieczne, aby zintegrować istniejącą instancję z vRackiem. +>> +>> **Pobieranie wymaganych informacji** +>> +>> Zidentyfikuj swoje instancje: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> lub +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 | +>> +--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Sieci publiczne i prywatne: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> lub +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Musisz zanotować identyfikatory sieci, które Cię interesują: +>> > +>> > - Ext-Net dla publicznego adresu IP +>> > - VLAN(y), które są wymagane dla Twojej konfiguracji +>> > +>> +>> **Dodawanie prywatnego interfejsu sieciowego** +>> +>> Aby dołączyć nowy interfejs, wykonaj następującą komendę: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Przykład: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> Możesz sprawdzić, czy akcja została wykonana: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => twoj publiczny IP +>> | MyVLAN-42 network | 192.168.0.x | => twoj prywatny IP +>> [...] +>> ``` +>> +>> lub +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => twoj publiczny IP ; twoj prywatny IP +>> [...] +>> ``` +>> + +### Usuwanie interfejsu sieciowego > [!warning] -> Konfiguracja nowego interfejsu rzadko przebiega automatycznie. -> W tym celu ustaw statyczny adres IP lub skonfiguruj usługę DHCP, w zależności od infrastruktury. > - -#### W Panelu klienta OVHcloud - -Zaloguj się do [Panelu klienta OVHcloud](/links/manager), przejdź do sekcji `Public Cloud`{.action} i wybierz odpowiedni projekt Public Cloud. - -Kliknij pozycję `Instancje`{.action} na lewym pasku nawigacyjnym, a następnie kliknij pozycję `...`{.action} z prawej strony instancji. Wybierz opcję `Informacje o instancji`{.action} wystąpienia. - -![wystąpienie szczegółowe](images/instance_details.png){.thumbnail} - -Spowoduje to otwarcie pulpitu nawigacyjnego instancji. Kliknij przycisk `...`{.action} po prawej stronie "Prywatne sieci", a następnie na `Przypisz sieć`{.action}. - -![przypisz sieć](images/vrack2021-01.png){.thumbnail} - -W wyświetlonym oknie wybierz sieci prywatne, które chcesz połączyć z instancją, a następnie kliknij przycisk `Przypisz`{.action}. - -![przypisz sieć](images/vrack9.png){.thumbnail} - -#### Zarządzanie interfejsami sieciowymi za pomocą interfejsu APIv6 OVHcloud - -Przejdź do [tej sekcji](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) (EN), odpowiedniego przewodnika. - -#### Zarządzanie interfejsami sieciowymi za pomocą OpenStack Horizon - -Zaloguj się do [interfejsu Horizon](https://horizon.cloud.ovh.net/auth/login/), przy użyciu metody określonej w [pierwszej części niniejszego przewodnika](./#interfejs-horizon). - -Wybierz właściwą strefę roboczą. - -![connection Horizon](images/horizon1.png){.thumbnail} - -Wybierz polecenie `Compute`, a następnie polecenie `Instances`. - -![Instancje obliczeniowe Horizon](images/horizon2.png){.thumbnail} - -**Dodanie prywatnego interfejsu sieciowego** - -Aby dodać interfejs, kliknij strzałkę w kolumnie "Actions" w celu uzyskania dostępu do możliwych akcji dla instancji. Wybierz opcję `Attach Interface`{.action}. - -![Horizon Attach Interface](images/horizon3.png){.thumbnail} - -Wybierz interfejs i zatwierdź. - -![Horizon Attach Interface](images/horizon4.png){.thumbnail} - -> [!primary] -> Twoja instancja OVHcloud będzie miała nowy interfejs sieciowy oprócz interfejsu publicznego (Ext-Net). ->
W podsumowaniu instancji wyświetlony zostanie prywatny adres IP automatycznie przypisany do Twojego interfejsu. ->
Do klienta należy poprawna konfiguracja interfejsu przez DHCP lub użycie odpowiednich adresów IP w statycznej konfiguracji IP. +> Odłączenie interfejsu sieciowego jest trwałe. +> +> Jednak ważne jest, aby zauważyć, że jeśli odłączysz interfejs "Ext-Net" (publiczny IP), ten adres zostanie zwolniony i ponownie wprowadzony do obiegu. Nie da się go ponownie przypisać.
+> Ta akcja jest wymagana tylko wtedy, gdy chcesz izolować swój serwer w vRacku (sieci prywatnej), lub jeśli chcesz usunąć go z jednej lub więcej VLAN. > -**Odłącz interfejs sieciowy** +Aby odłączyć interfejs, musisz najpierw zidentyfikować port Neutrona, który został utworzony. +Możesz to zrobić, używając poniższych komend: + +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` -> [!warning] -> Odłączenie interfejsu sieciowego powoduje jego natychmiastowe usunięcie. -> -> Pamiętaj, że po odłączeniu interfejsu "Ext-Net" (publiczny adres IP), zostanie on zwolniony i ponownie wprowadzony do obiegu. Nie będziesz mógł jej ponownie przypisać. ->
Tę czynność należy wykonać tylko wtedy, gdy chcesz odizolować serwer w sieci vRack (sieć prywatna) lub jeśli chcesz odizolować serwer z jednej lub kilku sieci VLAN. -> +lub + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` + +Po zidentyfikowaniu portu do usunięcia, możesz wykonać następującą komendę: -Aby usunąć interfejs, kliknij strzałkę w kolumnie "Actions" w celu uzyskania dostępu do możliwych akcji dla instancji. Wybierz opcję `Detach Interface`{.action}. +```bash +nova interface-detach +``` -![Interfejs odłączania Horizon](images/horizon5.png){.thumbnail} +Przykład: -Wybierz interfejs i zatwierdź. +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` -![Interfejs odłączania Horizon](images/horizon6.png){.thumbnail} +/// ## Sprawdź również -[Konfiguracja vRack dla Public Cloud przy użyciu interfejsu APIv6 OVHcloud](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) (EN) - -[Serwery dedykowane - Tworzenie kilku sieci VLAN w prywatnej sieci vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +[Tworzenie kilku sieci VLAN w prywatnej sieci vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) -Jeśli potrzebujesz szkolenia lub pomocy technicznej w celu wdrożenia naszych rozwiązań, skontaktuj się z przedstawicielem handlowym lub kliknij [ten link](/links/professional-services), aby uzyskać wycenę i poprosić o spersonalizowaną analizę projektu od naszych ekspertów z zespołu Professional Services. +Jeśli potrzebujesz szkoleń lub pomocy technicznej w wdrożeniu naszych rozwiązań, skontaktuj się ze swoim przedstawicielem handlowym lub kliknij w [ten link](/links/professional-services), aby uzyskać wycenę i zapytać naszych ekspertów ds. usług profesjonalnych o pomoc w konkretnym przypadku użycia Twojego projektu. Dołącz do [grona naszych użytkowników](/links/community). \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.pt-pt.md b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.pt-pt.md index ac16985c324..e8068134cb0 100644 --- a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.pt-pt.md +++ b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/guide.pt-pt.md @@ -1,340 +1,1194 @@ --- title: 'Configuração do vRack Public Cloud' excerpt: 'Saiba como configurar o vRack para as instâncias de Public Cloud' -updated: 2025-04-28 +updated: 2025-12-23 --- + + ## Objetivo -O [vRack](/links/network/vrack) é uma rede privada que lhe permite configurar o direcionamento entre vários servidores dedicados OVHcloud. Mas permite-lhe também adicionar [instâncias Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps) à sua rede privada a fim de criar uma infraestrutura de recursos físicos e virtuais. +O [vRack](/links/network/vrack) é uma rede privada que lhe permite configurar o endereçamento entre vários Servidores dedicados OVHcloud. Mas também lhe permite adicionar [instâncias Public Cloud](/links/public-cloud/Compute) à sua rede privada para criar uma infraestrutura de recursos físicos e virtuais. -**Este guia explica como configurar instâncias de Public Cloud no seu vRack.** +**Este guia tem como objetivo acompanhá-lo na configuração das suas instâncias Public Cloud no seu vRack.** ## Requisitos -- Dispor de um [projeto Public Cloud](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) -- Ter acesso à [Área de Cliente OVHcloud](/links/manager) -- um [utilizador OpenStack](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user) (opcional) -- Conhecimentos básicos de rede +- Ter um [projeto Public Cloud](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) +- Estar ligado ao seu [Área de Cliente OVHcloud](/links/manager) +- Ter [criado um utilizador OpenStack](/pages/public_cloud/public_cloud_cross_functional/create_and_delete_a_user) (opcional) +- Conhecimentos básicos de redes ## Apresentação das interfaces -Quer seja para criar o seu vRack ou adicionar uma instância dentro desta rede, poderá ser levada a utilizar a Área de Cliente OVHcloud, a APIv6 OVHcloud, a API OpenStack ou a interface Horizon ou a Terraform. +Seja para criar o seu vRack ou adicionar uma instância a esta rede, poderá utilizar o Área de Cliente OVHcloud, as APIv6 OVHcloud, as API OpenStack, a interface Horizon ou o Terraform. + +Consoante o seu perfil técnico e necessidades, terá de escolher qual a interface ou método a utilizar. Assim, para cada ação, apresentamos-lhe as diferentes abordagens possíveis. + +**Aqui está uma descrição rápida das ações possíveis consoante o método/interface escolhido:** -Em função do seu perfil técnico e das suas necessidades, terá de escolher qual a interface ou método a utilizar. Assim, para cada ação, iremos propor-lhe as diferentes abordagens possíveis. +/// details | Área de Cliente OVHcloud -**Eis uma descrição rápida das ações possíveis segundo o método/interface escolhida:** +[O Área de Cliente OVHcloud](/links/manager) é uma interface totalmente e exclusivamente visual, o que a torna uma interface ideal para a gestão de vários VLAN. Também terá a possibilidade de personalizar a faixa de IP privado, que por defeito é 10.1.0.0/16. -### Área de Cliente OVHcloud +Os VLAN serão implantados na região selecionada. Também terá a possibilidade de ativar ou não as gateways, ativar as distribuições DHCP, etc. -A [Área de Cliente OVHcloud](/links/manager) é uma interface inteiramente e unicamente visual, o que faz dela uma interface ideal para a gestão de várias VLANs. Terá igualmente a possibilidade de personalizar o intervalo de IP privado que, por defeito, é 10.x.x.x/16. +Também poderá gerir a faturação dos seus serviços através do seu Área de Cliente OVHcloud. -As VLAN serão implementadas de forma padrão em todas as zonas. Apenas terá a possibilidade de ativar ou não as gateways. +/// -Também poderá gerir a faturação dos seus serviços através da Área de Cliente OVHcloud. + -### Interface Horizon +/// details | Interface Horizon -Interface visual independente da OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) é a implementação inicial do painel de controlo da OpenStack, que fornece uma interface de utilizador web aos serviços OpenStack, incluindo Nova, Swift, Keystone, etc. +Interface visual independente da OVHcloud, [Horizon](https://horizon.cloud.ovh.net/auth/login/) é a implementação original do painel de controlo do OpenStack, que fornece uma interface web aos serviços OpenStack, incluindo Nova, Swift, Keystone, etc. -Esta interface completa e técnica permite-lhe gerir a quase totalidade das ações OpenStack. Esta será uma das interfaces necessárias se deseja gerir mais de duas VLAN, adicionar interfaces de rede privadas às suas instâncias, gerir imagens personalizadas, etc.. +Esta interface completa e técnica permite-lhe gerir a quase totalidade das ações OpenStack. Esta será uma das interfaces necessárias se quiser gerir mais de dois VLAN, adicionar interfaces de rede privadas às suas instâncias, gerir imagens personalizadas, etc. -Consulte o guia: [Criar um acesso à interface Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) para se familiarizar com o Horizon. +Consulte o guia "[Apresentação de Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon)" para se familiarizar com o Horizon. > [!primary] -> Uma vez que o Horizon funciona por zona, pense bem em escolher a sua zona geográfica de trabalho no topo à esquerda da sua interface (GRA5, SBG3, BHS1, etc.) +> O Horizon funciona por zonas, por isso, lembre-se de escolher a sua zona geográfica de trabalho no canto superior esquerdo da sua interface (GRA5, SBG3, BHS1, etc.) > -### APIv6 OVHcloud +/// -Cada ação que efetuar na Área de Cliente OVHcloud recorre às [APIv6 OVHcloud](/links/api). -Pode mesmo ir mais longe nas API do que na sua Área de Cliente. +/// details | APIv6 OVHcloud -A interface é menos visual que a Área de Cliente OVHcloud, mas permitir-lhe-á realizar um grande número de ações. Desta forma, poderá gerir e personalizar as suas VLAN, adicionar interfaces às suas instâncias ou ainda criar servidores altamente personalizados. +Toda a ação que realiza no Área de Cliente OVHcloud recorre às [APIv6 OVHcloud](/links/api). +Pode até ir mais longe nas APIs do que no seu espaço cliente. -Por vezes, será necessário recuperar várias informações antes da utilização de uma API específica. +A interface é menos visual do que o Área de Cliente OVHcloud, mas permitirá realizar um grande número de ações. Poderá gerir e personalizar os seus VLAN, adicionar interfaces às suas instâncias ou criar servidores altamente personalizados. -Pode simplesmente aceder às API a partir da [nossa página web](/links/api), mas também criar os seus scripts PHP ou Python para as contactar. +Por vezes, será necessário recuperar várias informações antes de utilizar uma API específica. -Assim, poderá automatizar livremente as tarefas de base através de scripts, otimizar as suas próprias funções, etc. +Pode aceder facilmente às APIs a partir [da nossa página web](/links/api), mas também criar os seus scripts PHP ou Python para os chamar. -Consulte o guia [Primeiros passos com as API OVHcloud](/pages/manage_and_operate/api/first-steps), para se familiarizar com a utilização das APIv6 OVHcloud. +Assim, será possível automatizar livremente as tarefas básicas através de scripts, otimizar as suas próprias funções, etc. -### API OpenStack +Consulte o guia "[Primeiros passos com as APIs OVHcloud](/pages/manage_and_operate/api/first-steps)" para se familiarizar com a utilização das APIv6 OVHcloud. -É possível administrar os serviços Public Cloud com a ajuda de linhas de comando Linux ou Windows, após o descarregamento e a instalação das ferramentas OpenStack. +/// -Este método requer bons conhecimentos Linux ou Windows para os beneficiar, mas permite usufruir de toda a potência do OpenStack por este meio. +/// details | API OpenStack -Conforme a camada que deseja gerir, deverá utilizar o cliente **Nova** (Compute), **Neutron** (network), **Glance** (Image) ou ainda **Swift** (Object Storage). O último nascido da família, o cliente OpenStack, permite-lhe gerir diretamente a quase totalidade das camadas OpenStack. +É possível administrar os serviços Public Cloud através de comandos Linux ou Windows, após o download e instalação das ferramentas OpenStack. -Graças à API OpenStack, pode também automatizar facilmente esta gestão através dos seus scripts. +Este método exige bons conhecimentos de Linux ou Windows para o utilizar, mas permite aproveitar toda a potência do OpenStack através deste meio. -Para se familiarizar com a API OpenStack, consulte os seguintes guias: +Consoante a camada que deseja gerir, deverá utilizar o cliente Nova (Compute), Neutron (rede), Glance (Imagem) ou ainda Swift (Object Storage). O mais recente da família, o cliente OpenStack, permite-lhe gerir diretamente a quase totalidade das camadas OpenStack. + +Através da API OpenStack, também pode facilmente automatizar esta gestão através dos seus scripts. + +Para se familiarizar com a API OpenStack, consulte primeiro os seguintes guias: - [Preparar o ambiente para utilizar a API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) - [Carregar as variáveis de ambiente OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) -Poderá, em função das suas necessidades, utilizar as API dedicadas ao OpenStack: +Poderá, consoante a sua necessidade, utilizar as APIs dedicadas ao OpenStack: -- Nova (compute) +- Nova (Compute) - Glance (imagem) - Cinder (imagem) - Neutron (rede) > [!primary] -> Em alguns casos, será mais simples utilizar as API OpenStack e noutros, as API Nova, Neutron, etc. +> Em alguns casos, será mais simples utilizar as APIs OpenStack e, em outros, as APIs Nova, Neutron, etc. > -> Da mesma forma, algumas funcionalidades podem estar ausentes da API OpenStack de acordo com a versão do seu cliente e do seu sistema operativo. -No âmbito deste manual, foi escolhido propor-lhe as alternativas mais simples e mais intuitivas. -Pode consultar a [documentação oficial do OpenStack](https://docs.openstack.org/) a qualquer momento, se pretender ir mais longe na sua utilização. +> Da mesma forma, algumas funcionalidades podem estar ausentes da API OpenStack consoante a versão do seu cliente e do seu sistema operativo. +> No âmbito deste guia, optou-se por lhe apresentar as alternativas mais simples e intuitivas. +> Pode consultar a qualquer momento a [documentação oficial do OpenStack](https://docs.openstack.org/fr/) se desejar ir mais longe na sua utilização. > -Para mais informações, consulte este guia: [Configuração do vRack Public Cloud com a ajuda do OpenStack CLI](/pages/public_cloud/public_cloud_network_services/getting-started-09-creating-vrack-with-openstack). +/// -### Terraform +/// details | CLI OpenStack -O Terraform permite igualmente gerir as infraestruturas da OVHcloud. +Pode gerir os seus serviços Public Cloud e o seu vRack OVHcloud diretamente a partir do seu terminal Linux ou Windows através da CLI OpenStack. -Para isso, deve escolher o bom fornecedor e o bom recurso Terraform. Encontre mais informações no nosso [guia de utilização do Terraform (EN)](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). +Esta interface permite gerir todas as camadas OpenStack: -## Instruções +- Nova: instâncias (Compute) +- Neutron: redes +- Glance: imagens +- Cinder: volumes -### Etapa 1: Ativar e gerir um vRack +A CLI centraliza estas funcionalidades e pode ser integrada nos seus scripts para automatizar as suas tarefas. -#### A partir da Área de Cliente OVHcloud +Antes de começar, consulte os seguintes guias: + +- [Preparar o ambiente para utilizar a API OpenStack](/pages/public_cloud/public_cloud_cross_functional/prepare_the_environment_for_using_the_openstack_api) +- [Carregar as variáveis de ambiente OpenStack](/pages/public_cloud/public_cloud_cross_functional/loading_openstack_environment_variables) > [!primary] -> Isto não se aplica aos projetos recém-criados que são agora entregues automaticamente com um vRack. Para visualizar o vRack após a criação do projeto, aceda ao menu `Network`{.action} no separador à esquerda. Clique em `Rede privada vRack`{.action} para consultar o(s) vRack(s). +> +> A CLI OpenStack é prática para gerir o seu vRack, no entanto algumas funções podem variar consoante a versão do cliente ou do sistema operativo. Consulte a [documentação oficial do OpenStack](https://docs.openstack.org/fr/). > -Se tem um projeto mais antigo e não possui vRack, deve encomendar um. Este produto é gratuito e a ativação é realizada em poucos minutos. - -No menu à esquerda do ecrã, clique no botão `Adicionar um serviço`{.action} (ícone do carrinho de compras). Utilize o filtro no topo da página ou desloque-se para baixo para encontrar o serviço `vRack`{.action}. - -![Order vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +/// -Será redirecionado para outra página para validar a encomenda, a operação demorará alguns minutos. +/// details | Terraform -Depois de ativado, o serviço será apresentado na Área de Cliente, na secção `Network`{.action} > `Rede Privada vRack`{.action}. Sob a designação « pn-xxxxx ». +O Terraform também permite gerir as infraestruturas da OVHcloud. -Na lista dos serviços elegíveis, selecione o projeto que deseja adicionar ao vRack e clique no botão `Adicionar`{.action}. +Para isso, terá de escolher o fornecedor e o recurso Terraform adequados. Encontre mais informações no nosso [guia de utilização do Terraform](/pages/manage_and_operate/terraform/terraform-at-ovhcloud). -![Adicionar o projeto](images/addprojectvrack.png){.thumbnail} +/// -Para continuar a configuração do vRack a partir da Área de Cliente OVHcloud, prossiga a leitura deste guia a partir de [Criar uma rede privada a partir da Área de Cliente OVHcloud](./#criar-uma-rede-privada-a-partir-da-área-de-cliente-ovhcloud). +## Instruções -#### A partir das APIv6 OVHcloud +### Passo 1: Ativar e gerir um vRack -Para ativar e gerir um vRack a partir das APIv6 OVHcloud, clique [aqui](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-1-activating-and-managing-a-vrack) (EN), para consultar o guia específico deste método. +> [!warning] +> +> O vRack é gerido ao nível da infraestrutura OVHcloud, o que significa que só o pode administrar a partir do seu espaço cliente e das APIv6 OVHcloud. +> -### Etapa 2: Criar uma rede privada no vRack +> [!tabs] +> A partir da Área de Cliente OVHcloud +>> > [!primary] +>> > +>> > Esta etapa não se aplica aos projetos recentemente criados, que são automaticamente fornecidos com um vRack. Para visualizar o vRack uma vez criado o projeto, aceda à secção `Network`{.action} e clique em `Rede privada vRack`{.action} para ver o(s) vRack(s). +>> > +>> +>> Se tiver um projeto mais antigo e não tiver um vRack, terá de encomendar um. Este produto é gratuito e a disponibilização demora apenas alguns minutos. +>> +>> No menu localizado à esquerda do ecrã, clique no botão `Adicionar um serviço`{.action} (ícone de cesta de compras). Utilize o filtro no topo da página ou desça para encontrar o serviço `vRack`{.action}. +>> +>> ![Encomendar o vrack](/pages/assets/screens/control_panel/product-selection/bare-metal-cloud/network/orderingvrack25.png){.thumbnail} +>> +>> Será redirecionado para outra página para validar a encomenda, a operação demorará alguns minutos. +>> +>> Uma vez o serviço ativo, encontrará-o no seu espaço cliente na secção `Network`{.action} > `Rede privada vRack`{.action}, sob a designação "pn-xxxxxx". +>> +>> Clique no seu vRack, selecione o projeto que deseja adicionar na lista dos serviços elegíveis e clique no botão `Adicionar`{.action}. +>> +>> ![adicionar o projeto](images/addprojectvrack.png){.thumbnail} +>> +>> Para continuar a configuração do vRack a partir da Área de Cliente OVHcloud, continue a ler este guia a partir do [passo 2: Criar uma rede privada no vRack](#create-pn-in-vrack), separador **A partir da Área de Cliente OVHcloud**. +>> +> A partir das APIv6 OVHcloud +>> +>> **Passo 1: Ativar e gerir um vRack** +>> +>> Conecte-se às APIv6 OVHcloud seguindo o guia "[Primeiros passos com as API OVHcloud](/pages/manage_and_operate/api/first-steps)". +>> +>> Uma vez autenticado, siga as etapas descritas em baixo: +>> +>> **Criação do cesto** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart +>> > +>> +>> > [!primary] +>> > +>> > Este pedido vai criar um identificador para o seu "cesto". Poderá adicionar tantos artigos quanto quiser antes de o validar. +>> > +>> > Neste caso, a encomenda de um vRack é gratuita. Recupere o número do seu cesto (cartId), será indispensável para a continuação. +>> > +>> +>> **Recuperação das informações necessárias à encomenda do vRack** +>> +>> > [!api] +>> > +>> > @api {v1} /order GET /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Este pedido vai permitir-lhe recuperar todas as informações necessárias à encomenda do vRack. Copie os seguintes elementos: +>> > +>> > *cartId*, *duration*, *planCode*, e *pricingMode*. +>> > +>> +>> **Adição do vRack ao cesto** +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/vrack +>> > +>> +>> > [!primary] +>> > +>> > Este pedido vai permitir-lhe adicionar o vRack ao cesto, adicionando todas as informações necessárias à encomenda. +>> > +>> > No caso do vRack, daria por exemplo: +>> > +>> > cartId: [identificador do seu cesto] +>> > +>> > duration: "P1M" +>> > +>> > planCode: "vrack" +>> > +>> > pricingMode: "default" +>> > +>> > quantity: 1 +>> > +>> +>> Uma vez que tenha validado a encomenda, obterá um número de artigo ("itemId"). Mantenha esta informação, será útil se desejar efetuar alterações antes da validação do cesto. +>> +>> **Validação do cesto** +>> +>> Uma vez que tenha colocado todos os artigos no seu cesto, terá de o validar: +>> +>> > [!api] +>> > +>> > @api {v1} /order POST /order/cart/{cartId}/checkout +>> > +>> +>> > [!primary] +>> > +>> > Este pedido vai validar o cesto e vai criar um bon de encomenda (orderId). Mantenha esta informação, será necessária para a validação da encomenda. +>> > +>> +>> **Validação da encomenda final** +>> +>> Para validar a encomenda, tem duas possibilidades: +>> +>> - Passar pela URL visível quando o cesto é validado. +>> Exemplo de URL: https://www.ovh.com/cgi-bin/order/displayOrder.cgi?orderId=12345678&orderPassword=xxxxxxxxxx +>> +>> - Validar pelo seguinte pedido: +>> +>> > [!api] +>> > +>> > @api {v1} /me POST /me/order/{orderId}/payWithRegisteredPaymentMean +>> > +>> +>> > [!primary] +>> > +>> > Mesmo que se trate de um bon de encomenda a 0 €, é necessário simular um pagamento do bon de encomenda (orderId). O seu bon de encomenda será então validado e o seu processamento começará. +>> > +>> +>> Uma vez que o bon de encomenda gratuito é validado, pode ser necessário um período de alguns minutos para que o vRack fique ativo. +>> +>> **Passo 2: Adicionar o seu projeto Public Cloud ao vRack** +>> +>> Uma vez que o vRack está ativo, terá de integrar o(s) seu(s) projeto(s) Public Cloud ao vRack. +>> +>> Conecte-se às APIv6 OVHcloud seguindo o guia "[Primeiros passos com as API OVHcloud](/pages/manage_and_operate/api/first-steps)". +>> +>> No caso em que o identificador do projeto Public Cloud não é conhecido, as seguintes chamadas permitirão que o encontre. +>> +>> **Identificação do projeto** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Este pedido permite recuperar a lista dos projetos. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Este pedido permite identificar o projeto através do campo "description". +>> > +>> +>> **Adição do projeto ao vRack** +>> +>> Uma vez que o identificador do projeto e o nome do vRack são conhecidos, a sua associação faz-se através do seguinte pedido: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack POST /vrack/{serviceName}/cloudProject +>> > +>> +>> Preencha os campos do pedido com as informações recolhidas anteriormente: +>> +>> - **serviceName**: nome do vRack sob a forma "pn-xxxxxx". +>> - **project**: identificador do projeto Public Cloud, sob a forma de uma cadeia de 32 caracteres. +>> +>> > [!primary] +>> > +>> > Este pedido inicializa a associação do projeto ao vRack, é necessário depois recuperar o identificador da tarefa para verificar o seu avanço. +>> > +>> +>> **Verificação do avanço da tarefa de adição** +>> +>> Pode consultar a evolução da adição do projeto ao vRack através deste pedido: +>> +>> > [!api] +>> > +>> > @api {v1} /vrack GET /vrack/{serviceName}/cloudProject/{project} +>> > +>> +>> > [!primary] +>> > +>> > Este pedido é facultativo e permite apenas verificar o estado da tarefa. Uma vez que esta esteja terminada, pode passar para a etapa seguinte. +>> > +>> + +### Passo 2: Criar uma rede privada no vRack É necessário criar uma rede privada com uma rede local virtual (VLAN) para que as instâncias ligadas ao vRack possam comunicar entre si. -Na oferta Public Cloud, pode criar até 4000 VLAN dentro de um único vRack. Isto significa que pode utilizar cada endereço IP privado até 4000 vezes. -Por exemplo, o IP 192.168.0.10 da VLAN 2 é diferente do IP 192.168.0.10 da VLAN 42. - -Pode ser útil para segmentar o seu vRack entre várias redes virtuais. +Na oferta Public Cloud, pode criar até 4 000 VLAN num único vRack. Isso significa que pode utilizar cada endereço IP privado até 4 000 vezes. +Assim, por exemplo, o IP 192.168.0.10 da VLAN 2 é diferente do IP 192.168.0.10 da VLAN 42. -A partir da Área de Cliente OVHcloud, poderá afetar a VLAN à sua escolha, mas não poderá personalizar a gama IP. O vRack estará ativo em todas as zonas. +Isso pode ser útil para segmentar o seu vRack entre vários redes virtuais. -A partir das APIv6 OVHcloud, poderá personalizar o conjunto dos parâmetros: intervalo IP (10.0.0.0/16, por exemplo), zona de implementação, DHCP, Gateway, etc. +A partir da Área de Cliente OVHcloud e das APIv6 OVHcloud, poderá personalizar todos os parâmetros: modo e região de implementação, nome e ID da VLAN, intervalo de endereços IP privados (por exemplo, 10.0.0.0/16), DHCP e Gateway. > [!primary] -> Nos servidores dedicados, por predefinição, está na VLAN 0. O funcionamento da infraestrutura OpenStack significa que deverá especificar o número da sua VLAN diretamente ao nível da infraestrutura. -> -> Contrariamente aos servidores dedicados, não é necessário « tagar » a VLAN diretamente numa instância Public Cloud. -> -> Para mais informações sobre a gestão das VLAN do vRack dos servidores dedicados, pode consultar este guia: [Criar várias VLAN no vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -> [!warning] -> Uma vez que o vRack é uma infraestrutura gerida ao nível da OVHcloud, só poderá administrá-lo através da Área de Cliente OVHcloud e da APIv6 OVHcloud. +> Nos Servidores dedicados, por defeito, está na VLAN 0. O funcionamento da infraestrutura OpenStack faz com que tenha de especificar o número da sua VLAN diretamente ao nível da infraestrutura. > -> Uma vez que o OpenStack não está situado no mesmo nível da infraestrutura, não poderá personalizar as VLAN através da interface Horizon ou das API OpenStack. +> Ao contrário dos Servidores dedicados, não é necessário "tagguar" a VLAN diretamente numa instância Public Cloud. > - -#### Criar uma rede privada a partir da Área de Cliente OVHcloud - -Uma vez o vRack criado, o passo seguinte consiste em criar uma rede privada. - -No separador Public Cloud, clique em `Private Network`{.action} no menu à esquerda em **Network**. - -![VLAN criação](images/vrack2022-03.png){.thumbnail} - -Clique agora em `Criar uma rede privada`{.action}. A página seguinte permite-lhe personalizar vários parâmetros. - -Na etapa 1, selecione a região na qual deseja criar a rede privada. - -![select region](images/vrack5-2024.png){.thumbnail} - -Na etapa seguinte, são-lhe apresentadas várias opções: - -![create network](images/vrack6-2022.png){.thumbnail} - -No campo **Nome da rede privada**, defina um nome para a sua rede privada. - -**Crie um Gateway e ligue-se à rede privada** - -Selecione esta opção se pretende criar instâncias apenas com uma rede privada. Para mais informações, consulte os seguintes guias: [Creating a private network with Gateway (EN)](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) e [Criação e conexão a uma primeira instância Public Cloud](/pages/public_cloud/compute/public-cloud-first-steps). +> Para mais informações sobre a gestão das VLAN do vRack dos Servidores dedicados, consulte este guia: [Criar múltiplas VLAN no vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). > [!warning] -> Se a opção for "cinzenta", isto significa que é incompatível com a região selecionada. Para mais informações, consulte a nossa página sobre a [disponibilidade dos produtos Public Cloud para cada região](/links/public-cloud/regions-pci). +> O vRack sendo uma infraestrutura gerida ao nível da OVHcloud, só o poderá administrar através da Área de Cliente OVHcloud e das APIv6 OVHcloud. > - -**Opções de rede do layer 2** - -Se selecionar a opção `Definir um ID de VLAN`, deverá escolher um número de VLAN compreendido entre 0 e 4000. - -Se não seleccionar esta caixa, o sistema atribuirá um número de VLAN aleatório. - -Caso seja necessário fazer comunicar servidores dedicados OVHcloud com VLAN taggado, consulte o seguinte guia: [Criar várias VLAN no vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). - -**Opções de distribuição dos endereços DHCP** - -O intervalo DHCP padrão é 10.0.0.0/16. Você pode usar outra praia privada de sua escolha. - -Depois de fazer as suas escolhas, clique em `Criar`{.action} para lançar o processo. - -> [!primary] -> A criação da rede privada pode levar alguns minutos. +> A OpenStack não estando situada ao mesmo nível da infraestrutura, não poderá personalizar as VLAN através da interface Horizon ou das API OpenStack. > -#### Criar uma rede privada a partir da APIv6 OVHcloud - -Para criar uma VLAN a partir da APIv6 OVHcloud, clique [aqui](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-3-creating-a-vlan-in-the-vrack) (EN), para consultar o guia específico deste método. - -#### Criar uma rede privada via Terraform - -No Terraform, é preciso utilizar o provider openstack. Pode descarregar um exemplo de script terraform completo em [este depósito](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). - -A parte específica da OVHcloud para a integração do vRack é o parâmetro `value_specs`. - -```python -resource "openstack_networking_network_v2" "tf_network" { - name = "tf_network" - admin_state_up = "true" - value_specs = { - "provider:network_type" = "vrack" - "provider:segmentation_id" = var.vlan_id - } -} -resource "openstack_networking_subnet_v2" "tf_subnet"{ - name = "tf_subnet" - network_id = openstack_networking_network_v2.tf_network.id - cidr = "10.0.0.0/16" - enable_dhcp = true -} -``` +> [!tabs] +> A partir da Área de Cliente OVHcloud +>> Após a criação do seu vRack, o próximo passo é criar uma rede privada. +>> +>> No separador `Public cloud`{.action}, clique em `Private Network`{.action} no menu à esquerda em **Network**. +>> +>> ![Criação de VLAN](images/vrack2022-03.png){.thumbnail} +>> +>> Clique agora em `Criar uma rede privada`{.action}. A página seguinte permitirá personalizar vários parâmetros. +>> +>> Para começar, selecione um modo de implantação e a região onde pretende criar a rede privada. +>> +>> ![seleccionar região](images/vrack5-2024.png){.thumbnail} +>> +>> Na etapa seguinte, são apresentadas-lhe várias opções: +>> +>> ![criar rede](images/vrack6-2022.png){.thumbnail} +>> +>> No campo **Nome da rede privada**, defina um nome para a sua rede privada. +>> +>> **Opções de rede do layer 2** +>> +>> Se marcar a caixa `Definir um ID de VLAN`{.action}, terá de escolher um número de VLAN entre 0 e 4000. +>> +>> Se não marcar esta caixa, o sistema atribuirá um número de VLAN aleatório. +>> +>> No caso em que precise de comunicar Servidores dedicados OVHcloud com VLAN taggueados, consulte o seguinte guia: [Criar vários VLAN no vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack). +>> +>> **Opções de distribuição de endereços DHCP** +>> +>> A faixa DHCP por defeito é 10.1.0.0/16. Pode utilizar outra faixa privada à sua escolha ou desativar o DHCP para esta rede privada. +>> +>> **Opções de gateway de rede** +>> +>> - **Anunciar o primeiro endereço de um CIDR dado como gateway predefinido (DHCP opção 3)**: Quando esta opção está ativa, o servidor DHCP anuncia o primeiro endereço do CIDR como gateway predefinido para as máquinas ligadas à rede. +>> - **Atribuir um Gateway e ligar-se à rede privada**: Selecione esta opção se tiver a intenção de criar instâncias com rede privada apenas. Para mais informações, convidamo-lo a consultar os seguintes guias: [Criar uma rede privada com uma Gateway](/pages/public_cloud/public_cloud_network_services/getting-started-02-create-private-network-gateway) e [Criar uma primeira instância Public Cloud e ligar-se a ela](/pages/public_cloud/Compute/public-cloud-first-steps). +>> +>> > [!warning] +>> > +>> > Se a segunda opção estiver cinzenta, isso significa que é incompatível com a região selecionada. Para mais informações, consulte a nossa página sobre [disponibilidade dos produtos Public Cloud para cada região](/links/public-cloud/regions-pci). +>> > +>> +>> Após tomar as suas decisões, clique em `Configure a sua rede privada`{.action} para iniciar o processo. +>> +>> > [!primary] +>> > +>> > A criação da rede privada pode demorar vários minutos. +>> > +>> +> A partir das APIv6 OVHcloud +>> +>> Após se ligar à [APIv6 OVHcloud](/links/api), execute os seguintes comandos por ordem. +>> +>> **Passo 1 - Recolha das informações necessárias:** +>> +>> **Projeto Public Cloud** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> > [!primary] +>> > +>> > Este chamada permite obter a lista dos projetos. +>> > +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName} +>> > +>> +>> > [!primary] +>> > +>> > Este chamada permite identificar o projeto através do campo "description". +>> > +>> +>> **vRack afetado** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/vrack +>> > +>> +>> > [!primary] +>> > +>> > No campo serviceName, indique o identificador do seu projeto. Mantenha a informação relativa ao identificador do vRack na forma "pn-xxxxx". +>> > +>> +>> **Passo 2 - Criação da rede privada:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Preencha os campos com as informações obtidas anteriormente: +>> > +>> > - **serviceName**: ID do projeto. +>> > - **name**: o nome que pretende dar ao VLAN. +>> > +>> > Pode deixar o campo "Region" vazio para que seja ativado para todas as regiões. +>> > +>> > O identificador do VLAN (vlanId) é necessário se pretender criar um VLAN específico. +>> > +>> +>> A criação demora alguns instantes. +>> +>> Para verificar as informações dos seus VLAN, pode utilizar o seguinte chamada: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > Este chamada permite obter o networkId. Este apresentar-se-á da seguinte forma: nome-vrack_vlanId. +>> > +>> > Por exemplo, para o VLAN 42: pn-xxxxxx_42. +>> > +>> +>> **Passo 3 - Criação da sub-rede:** +>> +>> Por defeito, se não adicionar nenhuma sub-rede, a faixa IP utilizada é a seguinte: +>> +>> ``` +>> 10.1.0.0/16 +>> ``` +>> +>> Se pretender gerir as atribuições IP por si, terá de criar uma sub-rede. +>> +>> Para isso, uma vez criado o VLAN, terá de criar a sub-rede para cada zona afetada através do seguinte chamada: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/network/private/{networkId}/subnet +>> > +>> +>> Pode preencher os campos da seguinte forma: +>> +>> |Campo|Descrição| +>> |---|---| +>> |serviceName|Identificador do seu projeto.| +>> |networkId|Identificador da sua rede obtido nas chamadas anteriores. Por exemplo: pn-xxxxxx_42 para o VLAN 42.| +>> |dhcp|Caixa marcada para ativação / desmarcada para desativação do DHCP no VLAN.| +>> |end|Último endereço da sub-rede da região. Por exemplo: 192.168.1.50.| +>> |network|Bloco IP da sub-rede. Por exemplo: 192.168.1.0/24.| +>> |region|Exemplo: SBG3.| +>> |start|Primeiro endereço da sub-rede para esta região. Por exemplo: 192.168.1.15.| +>> +>> > [!primary] +>> > +>> > Esta é a etapa de criação da sub-rede por região. Pode ativar ou não a atribuição de endereços IP privados de forma dinâmica através do DHCP. +>> > +>> > Terá de efetuar a mesma operação para cada zona onde estão as suas instâncias. +>> > +>> +>> > [!warning] +>> > +>> > Preste atenção a separar bem os seus pools de endereços IP para as diferentes regiões. Por exemplo: +>> > +>> > - De 192.168.0.2 a 192.168.0.254 para SBG1. +>> > - De 192.168.1.2 a 192.168.1.254 para GRA1. +>> > +>> +> A partir do Terraform +>> +>> No Terraform, é necessário utilizar o provider OpenStack. Pode transferir um exemplo de script terraform completo neste [repositório GitHub](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network). +>> +>> A parte específica da OVHcloud para a integração vRack é o parâmetro `value_specs`. +>> +>> ```python +>> resource "openstack_networking_network_v2" "tf_network" { +>> name = "tf_network" +>> admin_state_up = "true" +>> value_specs = { +>> "provider:network_type" = "vrack" +>> "provider:segmentation_id" = var.vlan_id +>> } +>> } +>> resource "openstack_networking_subnet_v2" "tf_subnet"{ +>> name = "tf_subnet" +>> network_id = openstack_networking_network_v2.tf_network.id +>> cidr = "10.1.0.0/16" +>> enable_dhcp = true +>> } +>> ``` +>> +> A partir da CLI OpenStack +>> No seguinte exemplo, especificamos o `VLAN_ID` ao qual pretendemos que a rede pertença através de `--provider-network-type` e `--provider-segment`. +>> +>> Pode remover estes parâmetros. Nesse caso, será utilizado um `VLAN_ID` disponível. +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network +>> openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.1.0.0/16 +>> ``` +>> ### Etapa 3: Integrar uma instância no vRack -Existem duas situações: +Duas situações podem ocorrer: - A instância ainda não existe. -- A instância já existe e deve adicioná-la ao vRack. - -**Em caso de nova instância** - -#### A partir da Área de Cliente OVHcloud - -Consulte o guia: [Criar uma instância a partir da Área de Cliente](/pages/public_cloud/compute/public-cloud-first-steps). Ao criar uma instância, poderá especificar, na etapa 5, pode escolher um modo de rede e depois uma rede privada na qual possa integrar a sua instância. - -![attach new instance](images/network-selection.png){.thumbnail} +- A instância já existe e tem de a adicionar ao vRack. + +/// details | **Caso de uma nova instância** + +> [!tabs] +> A partir da Área de Cliente OVHcloud +>> Consulte o guia "[Criar uma instância a partir do espaço cliente](/pages/public_cloud/Compute/public-cloud-first-steps)". Durante a criação de uma instância, pode escolher na etapa 5, um modo de rede e, em seguida, uma rede privada à qual integrar a sua instância. +>> +>> ![anexar nova instância](images/network-selection.png){.thumbnail} +>> +>> > [!warning] +>> > +>> > Ao criar uma nova instância, só poderá ligar a instância a **um único** vRack a partir da Área de Cliente OVHcloud. +>> > +>> > Para adicionar várias interfaces diferentes, terá de utilizar as APIs OpenStack ou Horizon. +>> > +>> +> A partir das APIv6 OVHcloud +>> Uma vez ligado à [APIv6 OVHcloud](/links/api), execute os seguintes comandos por ordem. +>> +>> **Passo 1 - Recolha das informações necessárias** +>> +>> **Recolha do identificador do projeto:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Recolha do networkID da rede pública (EXT-NET)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Recolha do networkID da rede privada (interface vRack criada anteriormente)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > O identificador obtido tem a forma: "pn-xxxxx_yy" onde yy é o número do VLAN. +>> > +>> +>> **Recolha do identificador do tipo de instância escolhido (flavorId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/flavor +>> > +>> +>> > [!primary] +>> > +>> > Pode limitar a lista indicando a zona de criação da sua instância. +>> > +>> +>> **Recolha do identificador da imagem escolhida (imageId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/image +>> > +>> +>> > [!primary] +>> > +>> > Pode limitar a lista indicando a zona de criação da sua instância. +>> > +>> +>> **Recolha do identificador da sua chave SSH OpenStack (sshKeyId)** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/sshkey +>> > +>> +>> Se ainda não adicionou uma chave SSH ao seu espaço cliente, pode fazê-lo através da seguinte função API: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/sshkey +>> > +>> +>> **Passo 2 - Implementação da instância** +>> +>> Uma vez reunidos todos os elementos necessários à implementação, pode utilizar o seguinte chamada: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance +>> > +>> +>> Terá de preencher, no mínimo, os seguintes campos: +>> +>> |Campo|Descrição| +>> |---|---| +>> |serviceName|Identificador do projeto Public Cloud.| +>> |flavorId|Identificador do tipo de instância (por exemplo: D2-2, B2-7, WIN-R2-15, etc.).| +>> |imageId|Identificador da imagem de implementação (por exemplo: Debian 9, Centos 7, etc.).| +>> |name|Nome que dá à sua instância.| +>> |networks|Na parte "networkId", indique o identificador da rede pública (ext-net) ou o da sua VLAN (pn-xxxxxx_yy). Pode clicar no botão "+" para adicionar outras redes.| +>> |region|Regiões de implementação da instância (por exemplo: GRA5).| +>> |sshKeyId|Identificador da sua chave SSH OpenStack.| +>> +>> Uma vez feita a chamada, se todas as informações estiverem corretamente preenchidas, a instância vai ser criada com uma ou várias interfaces de rede. +>> +>> > [!warning] +>> > +>> > Consoante os sistemas operativos, terá de configurar manualmente as suas interfaces de rede privadas para que sejam reconhecidas.
+>> > Como OpenStack não é capaz de priorizar a interface pública em relação à interface vRack, pode acontecer que esta última passe a ser a rota por defeito.
+>> > A consequência direta é que a instância não é acessível a partir de um IP público.
+>> > Um ou vários reinícios da instância a partir do espaço cliente podem resolver a situação.
+>> > Outra solução consiste em ligar-se à instância em SSH através de outro dos seus servidores presentes na mesma rede privada. Também pode corrigir a configuração de rede da instância através do modo Rescue. +>> > +>> +> A partir da CLI OpenStack +>> **Recolha das informações necessárias** +>> +>> Identificação das redes públicas e privadas: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MeuVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MeuVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MeuVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MeuVLAN_0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Terá de anotar os IDs das redes que o interessam: +>> > +>> > - Ext-Net para ter um IP público. +>> > - O(s) do(s) VLAN(s) necessários à sua configuração. +>> > +>> +>> Anote também as seguintes informações, como indicado no [guia de utilização da API Nova](/pages/public_cloud/Compute/starting_with_nova): +>> +>> - ID ou nome da chave SSH OpenStack. +>> - ID do tipo de instância (flavor). +>> - ID da imagem desejada (Sistema operativo, snapshot, etc.). +>> +>> **Implementação da instância** +>> +>> Com os elementos recuperados anteriormente, é possível criar uma instância incluindo-a diretamente no vRack: +>> +>> ```bash +>> nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Por exemplo: +>> +>> ```bash +>> nova boot --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nome da chave] | +>> | metadata | {} | +>> | name | [Nome da sua instância] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [nom de votre instance] +>> ``` +>> +>> Por exemplo: +>> +>> ```bash +>> openstack server create --key-name ma-cle-ssh --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_VLAN] NomDeMonInstance +>> +>> +--------------------------------------+------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+------------------------------------------------------+ +>> | OS-DCF:diskConfig | MANUAL | +>> | OS-EXT-AZ:availability_zone | | +>> | OS-EXT-STS:power_state | 0 | +>> | OS-EXT-STS:task_state | scheduling | +>> | OS-EXT-STS:vm_state | building | +>> | OS-SRV-USG:launched_at | - | +>> | OS-SRV-USG:terminated_at | - | +>> | accessIPv4 | | +>> | accessIPv6 | | +>> | adminPass | xxxxxxxxxxxx | +>> | config_drive | | +>> | created | YYYY-MM-DDTHH:MM:SSZ | +>> | flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | hostId | | +>> | id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | +>> | image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | +>> | key_name | [Nome da chave] | +>> | metadata | {} | +>> | name | [Nome da sua instância] | +>> | os-extended-volumes:volumes_attached | [] | +>> | progress | 0 | +>> | security_groups | default | +>> | status | BUILD | +>> | tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> | updated | YYYY-MM-DDTHH:MM:SSZ | +>> | user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | +>> +--------------------------------------+------------------------------------------------------+ +>> ``` +>> +>> Pode definir o endereço IP da sua interface vRack no nível do OpenStack. +>> +>> Para isso, pode adicionar um simples argumento na função "--nic": +>> +>> `--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]` +>> +>> Por exemplo: +>> +>> `--nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42` +>> +>> **Verificação da instância** +>> +>> Após alguns instantes, pode verificar a lista das instâncias existentes para encontrar o servidor criado: +>> +>> ```bash +>> openstack server list +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Nome da instância] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | [Nome da instância] | +>> +--------------------------------------+---------------------+--------+--------------------------------------------------+---------------------+ +>> ``` +>> +>> ```bash +>> nova list +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Nome da instância] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MonVrack=[IP_V4_vRack] | +>> +--------------------------------------+---------------------+--------+------------+-------------+--------------------------------------------------+ +>> ``` +>> + +/// + +/// details | **Caso de uma instância já existente** + +A Área de Cliente OVHcloud permite ligar uma instância a uma ou várias redes privadas, mas não oferece uma configuração avançada das interfaces de rede. Se pretender personalizar estas, terá de as gerir, quer através das APIv6 OVHcloud, quer através das API OpenStack ou através do Horizon. + +A ação consistirá apenas em adicionar uma nova interface de rede ao seu servidor, para além da existente. + +Assim, por exemplo, se tiver uma interface pública *eth0*, terá também uma interface *eth1*. > [!warning] -> Ao criar uma nova instância, só poderá ligar a sua instância a um vRack a partir da Área de Cliente OVHcloud. -> Para adicionar várias interfaces diferentes, deverá passar pelas API OpenStack ou interface Horizon. +> A configuração desta nova interface raramente é automática. Terá, por isso, de a configurar em DHCP ou com IP fixo, consoante a sua infraestrutura. > -#### A partir da APIv6 OVHcloud - -Clique [aqui](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#step-4-integrating-an-instance-into-the-vrack) (EN), para consultar o guia específico deste método. - -**Caso de uma instância existente** - -A Área de Cliente OVHcloud permite associar uma instância a uma ou várias redes privadas, mas não oferece uma configuração avançada das interfaces de rede. Se deseja personalizar mais estas, terá de as gerir quer a partir das APIv6 OVHcloud, quer através das API OpenStack ou através do Horizon. - -A ação consistirá em simplesmente adicionar uma nova interface de rede ao seu servidor, para além da existente. - -Assim, por exemplo, se tiver uma interface pública *eth0*, terá ainda uma interface *eth1*. +> [!tabs] +> A partir da Área de Cliente OVHcloud +>> Inicie sessão na sua [Área de Cliente OVHcloud](/links/manager), aceda à secção `Public Cloud`{.action} e selecione o projeto Public Cloud relevante no canto superior esquerdo. +>> +>> Clique em seguida em `Instâncias`{.action} no menu lateral esquerdo. Clique depois no botão `⁝`{.action} à direita da instância relevante e em seguida em `Detalhes da instância`{.action}. +>> +>> ![detalhe instância](images/instance_details.png){.thumbnail} +>> +>> O painel de gestão da sua instância é então apresentado. Clique no botão `⁝`{.action} à direita de "Redes privadas" e em seguida em `Associar uma rede`{.action}. +>> +>> ![ligar rede](images/vrack2021-01.png){.thumbnail} +>> +>> Na janela pop-up que aparece, selecione a(s) rede(s) privada(s) a ligar à sua instância e clique em `Confirmar`{.action}. +>> +>> ![ligar rede](images/vrack9.png){.thumbnail} +>> +> A partir das APIv6 OVHcloud +>> A ação consistirá apenas em adicionar uma nova interface de rede ao seu servidor, para além da existente. +>> +>> Assim, por exemplo, se o servidor dispõe de uma interface pública eth0, uma interface adicional eth1 será adicionada. +>> +>> > [!primary] +>> > +>> > A configuração desta nova interface raramente é automática.
+>> > Terá, por isso, de a configurar em DHCP ou com IP fixo, consoante a sua infraestrutura. +>> > +>> +>> **Os passos seguintes descrevem como gerir as interfaces de rede das suas instâncias.** +>> +>> **Passo 1 - Recolha das informações necessárias** +>> +>> **Recolha do identificador do projeto:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project +>> > +>> +>> **Recolha do identificador da instância:** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/instance +>> > +>> +>> **Recolha do networkID da rede pública (EXT-NET):** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/public +>> > +>> +>> **Recolha do networkID da rede privada (interface vRack criada anteriormente):** +>> +>> > [!api] +>> > +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/network/private +>> > +>> +>> > [!primary] +>> > +>> > O identificador obtido tem a forma: "pn-xxxxx_yy" onde yy é o número do VLAN. +>> > +>> +>> **Passo 2 - Adição de uma interface à sua instância** +>> +>> Uma vez recolhida toda a informação necessária, pode utilizar o seguinte pedido: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/instance/{instanceId}/interface +>> > +>> +>> Terá de preencher, no mínimo, os seguintes campos: +>> +>> |Campo|Descrição| +>> |---|---| +>> |serviceName|Identificador do projeto Public Cloud relevante.| +>> |instanceId|Identificador da instância relevante.| +>> |networkId|Indique o identificador da rede pública (ext-net) ou o do seu VLAN (pn-xxxxxx_yy).| +>> |ip|Definir um IP específico (funciona apenas para interfaces privadas).| +>> +>> Uma vez feito o pedido, se todas as informações estiverem corretamente preenchidas, uma nova interface será adicionada à sua instância. +>> +>> > [!primary] +>> > +>> > A sua instância OVHcloud dispõe, portanto, de uma nova interface de rede, para além da interface pública (Ext-net).
+>> > Poderá ver, no resumo da instância, o endereço IP privado atribuído automaticamente à sua interface.
+>> > Será da sua responsabilidade utilizá-lo, configurando a sua interface através do DHCP ou utilizando os seus próprios IPs através de uma configuração em IP estático. +>> > +>> +>> **Passo 3 - Desligar uma interface da sua instância** +>> +>> > [!warning] +>> > +>> > Desligar uma interface de rede leva à sua eliminação imediata. +>> > +>> > No entanto, é importante notar que se desligar a interface "Ext-Net" (IP público), este endereço será libertado e posto à disposição. Não será, portanto, possível reatribuí-lo.
+>> > Esta ação só deve ser realizada se pretender isolar o seu servidor no vRack (rede privada) ou, inversamente, removê-lo de um ou vários VLAN. +>> > +>> +>> Uma vez recolhida toda a informação necessária, pode utilizar o seguinte pedido para eliminar uma interface: +>> +>> > [!api] +>> > +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId} +>> > +>> +>> Terá de preencher, no mínimo, os seguintes campos: +>> +>> |Campo|Descrição| +>> |---|---| +>> |serviceName|Identificador do projeto Public Cloud relevante.| +>> |instanceId|Identificador da instância relevante.| +>> |networkId|Indique o identificador da rede pública (ext-net) ou o do seu VLAN (pn-xxxxxx_yy).| +>> +> A partir do OpenStack Horizon +>> Inicie sessão na interface [Horizon](https://horizon.cloud.ovh.net/auth/login/) seguindo o método indicado na [primeira parte deste guia](#horizon). +>> +>> Inicie sessão na sua área de trabalho: +>> +>> ![ligação Horizon](images/horizon1.png){.thumbnail} +>> +>> Dirija-se depois para `Compute`, seguido de `Instances`: +>> +>> ![Horizon Compute instances](images/horizon2.png){.thumbnail} +>> +>> **Adição de uma interface de rede privada** +>> +>> Para adicionar uma interface, na coluna `Actions`, clique na seta que permite aceder às ações possíveis sobre a instância. Clique então em `Attach Interface`{.action}: +>> +>> ![Horizon attach interface](images/horizon3.png){.thumbnail} +>> +>> Selecione a sua interface e valide: +>> +>> ![Horizon attach interface](images/horizon4.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > A sua instância OVHcloud dispõe, portanto, de uma nova interface de rede, para além da interface pública (Ext-net).
+>> > Poderá ver, no resumo da instância, o endereço IP privado atribuído automaticamente à sua interface.
+>> > Será da sua responsabilidade utilizá-lo, configurando a sua interface através do DHCP ou utilizando os seus próprios IPs através de uma configuração em IP estático. +>> > +>> +>> **Desligar uma interface de rede** +>> +>> > [!warning] +>> > +>> > Desligar uma interface de rede leva à sua eliminação imediata. +>> > +>> > No entanto, é importante notar que se desligar a interface "Ext-Net" (IP público), este endereço será libertado e posto à disposição. Não será, portanto, possível reatribuí-lo.
+>> > Esta ação só deve ser realizada se pretender isolar o seu servidor no vRack (rede privada) ou, inversamente, removê-lo de um ou vários VLAN. +>> > +>> +>> Para desligar uma interface de rede privada, na coluna `Actions`, clique na seta que permite aceder às ações possíveis sobre a instância. Clique então em `Detach Interface`{.action}: +>> +>> ![Horizon detach interface](images/horizon5.png){.thumbnail} +>> +>> Selecione a interface a eliminar e valide: +>> +>> ![Horizon detach interface](images/horizon6.png){.thumbnail} +>> +> A partir da CLI OpenStack +>> **Recolha das informações necessárias** +>> +>> Identificação das suas instâncias: +>> +>> ```bash +>> openstack server list +>> +>> +--------------------------------------+-----------------+--------+------------------------------------------------------------------------+------------+ +>> | ID | Name | Status | Networks | Image Name | +>> +--------------------------------------+-----------------+--------+------------------------------------------------------------------------+------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Minha-instância | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MonVrack=192.168.0.124 | Debian 9 | +>> +--------------------------------------+-----------------+--------+------------------------------------------------------------------------+------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova list +>> +>> +--------------------------------------+-----------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | ID | Name | Status | Task State | Power State | Networks | +>> +--------------------------------------+-----------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | Minha-instância | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MonVrack=192.168.0.124 | +>> +--------------------------------------+-----------------+--------+------------+-------------+----------------------------------------------------------------------+ +>> ``` +>> +>> Identificação das redes públicas e privadas: +>> +>> ```bash +>> openstack network list +>> +>> +--------------------------------------+------------+-------------------------------------+ +>> | ID | Name | Subnets | +>> +--------------------------------------+------------+-------------------------------------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MeuVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx| +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MeuVLAN-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx| +>> +--------------------------------------+------------+-------------------------------------+ +>> ``` +>> +>> ou +>> +>> ```bash +>> nova net-list +>> +>> +--------------------------------------+------------+------+ +>> | ID | Label | CIDR | +>> +--------------------------------------+------------+------+ +>> | 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MeuVLAN-42 | None | +>> | 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None | +>> | 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MeuVLAN-0 | None | +>> +--------------------------------------+------------+------+ +>> ``` +>> +>> > [!primary] +>> > +>> > Terá de anotar os IDs das redes que o interessam: +>> > +>> > - Ext-Net para ter um IP público. +>> > - O(s) do(s) VLAN necessário(s) à sua configuração. +>> > +>> +>> **Adição de uma interface de rede privada** +>> +>> Para ligar uma nova interface, pode executar o seguinte comando: +>> +>> ```bash +>> nova interface-attach --net-id +>> ``` +>> +>> Por exemplo: +>> +>> ```bash +>> nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx +>> ``` +>> +>> Pode verificar que a ação foi bem-sucedida: +>> +>> ```bash +>> nova show +>> +>> +--------------------------------------+----------------------------------------------------------+ +>> | Property | Value | +>> +--------------------------------------+----------------------------------------------------------+ +>> | Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => seu IP público +>> | MeuVLAN-42 network | 192.168.0.x | => seu IP privado +>> [...] +>> ``` +>> +>> ou +>> +>> ```bash +>> openstack server show +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> | Field | Value | +>> +--------------------------------------+-------------------------------------------------------------------------+ +>> [...] +>> | addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MeuVLAN-42=192.168.0.x | => seu IP público ; seu IP privado +>> [...] +>> ``` +>> + +### Desligar uma interface de rede > [!warning] -> A configuração desta nova interface raramente é automática. -> Será necessário configurá-la em DHCP ou IP Fixo consoante a sua infraestrutura. +> Desligar uma interface de rede leva à sua eliminação imediata. +> +> No entanto, é importante notar que se desligar a interface "Ext-Net" (IP público), este endereço será libertado e posto à disposição. Não será, portanto, possível reatribuí-lo.
+> Esta ação só deve ser realizada se pretender isolar o seu servidor no vRack (rede privada) ou, inversamente, removê-lo de um ou vários VLAN. > -#### A partir da Área de Cliente OVHcloud** - -Aceda à [Área de Cliente OVHcloud](/links/manager), aceda à secção `Public Cloud`{.action} e selecione o projeto Public Cloud em questão no canto superior esquerdo. - -Clique em `Instâncias`{.action} no menu lateral esquerdo. A seguir, clique no botão `...`{.action} à direita da instância em causa e, a seguir, em `Dados da instância`{.action}. - -![de](images/instance_details.png){.thumbnail} - -Isso abrirá o painel de instâncias. Clique em `...`{.action} à direita de "Rede(s) privada(s)" e, a seguir, em `Associar uma rede`{.action}. - -![associar rede](images/vrack2021-01.png){.thumbnail} - -Na pop-up que aparecer, selecione a ou as redes privadas a associar à sua instância e clique em `Associar`{.action}. - -![associar rede](images/vrack9.png){.thumbnail} - -#### Gestão das interfaces de rede a partir da APIv6 OVHcloud - -Clique [aqui](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api#in-case-of-an-existing-instance) (EN), para consultar o guia específico deste método. - -#### Gestão das interfaces de rede a partir do OpenStack Horizon - -Ligue-se à interface [Horizon](https://horizon.cloud.ovh.net/auth/login/) de acordo com o método indicado na [primeira parte deste guia](./#interface-horizon). - -Ligue-se bem à sua zona de trabalho: - -![ligação Horizon](images/horizon1.png){.thumbnail} - -Selecione `Compute` e, em seguida, `Instances` no menu. - -![Horizon compute instâncias](images/horizon2.png){.thumbnail} - -**Adição de uma interface privada** - -Para adicionar uma interface, na coluna "Actions", clique na seta que permite aceder às ações possíveis na instância. A seguir, clique em `Attach Interface`{.action}: - -![Horizon attach interface](images/horizon3.png){.thumbnail} - -Selecione a sua interface e valide: +Para desligar uma interface de rede, terá, em primeiro lugar, de identificar o port Neutron que foi criado. -![Horizon attach interface](images/horizon4.png){.thumbnail} +Para isso, pode utilizar os seguintes comandos: -> [!primary] -> Sua instância de OVHcloud terá uma nova interface de rede além da interface pública (Ext-Net). ->
No resumo da instância, poderá ver o endereço IP privado atribuído automaticamente à sua interface. ->
É sua responsabilidade configurar corretamente a interface por meio de DHCP ou usando os endereços IP adequados por meio de uma configuração de IP estático. -> +```bash +neutron port-list ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| id | name | mac_address | fixed_ips | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} | +| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} | ++--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+ +``` -**Desassociar uma interface de rede** +ou + +```bash +openstack port list ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| ID | Name | MAC Address | Fixed IP Addresses | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' | +| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' | +| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' | ++--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+ +``` -> [!warning] -> Desassociar uma interface de rede leva à sua eliminação imediata. -> -> No entanto, é importante notar que se desassociar a interface « Ext-Net » (IP público), esse endereço será liberado e reposto em circulação. Por isso, não se conseguiria atribuir a si próprio a responsabilidade. ->
Esta ação só deve ser efetuada se pretender isolar o seu servidor no vRack (rede privada) ou, caso contrário, retirá-lo de uma ou várias VLAN. -> +Uma vez identificado o porto a eliminar, pode executar o seguinte comando: -Para eliminar uma interface, na coluna "Actions", clique na seta que permite aceder às ações possíveis na instância. A seguir, clique em `Detach Interface`{.action}: +```bash +nova interface-detach +``` -![Horizon detach interface](images/horizon5.png){.thumbnail} +Por exemplo: -Selecione a interface a eliminar e valide: +```bash +nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef +``` -![Horizon detach interface](images/horizon6.png){.thumbnail} +/// ## Quer saber mais? -[Configuração do vRack Public Cloud a partir das APIv6 OVHcloud](/pages/public_cloud/public_cloud_network_services/getting-started-08-creating-vrack-with-api) (EN) - -[Servidores dedicados - Criar várias VLAN no vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) +[Servidores dedicados - Criar vários VLAN no vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack) -Se precisar de formação ou de assistência técnica para implementar as nossas soluções, contacte o seu representante comercial ou clique em [esta ligação](/links/professional-services) para obter um orçamento e solicitar uma análise personalizada do seu projecto aos nossos especialistas da equipa de Serviços Profissionais. +Se precisar de formação ou de assistência técnica para a implementação das nossas soluções, contacte o seu comercial ou clique [aqui](/links/professional-services) para obter um orçamento e solicitar uma análise personalizada do seu projeto aos nossos especialistas da equipa Professional Services. -Fale com nossa [comunidade de utilizadores](/links/community). \ No newline at end of file +Fale com a nossa [comunidade de utilizadores](/links/community). \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/instance_details.png b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/instance_details.png index 0a556c890f9..aa9e4202e30 100644 Binary files a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/instance_details.png and b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/instance_details.png differ diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack2021-01.png b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack2021-01.png index ab2e88c9647..d2cb8067687 100644 Binary files a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack2021-01.png and b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack2021-01.png differ diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack5-2024.png b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack5-2024.png index f64ba05da04..f7fbf0f714d 100644 Binary files a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack5-2024.png and b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack5-2024.png differ diff --git a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack6-2022.png b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack6-2022.png index e2e2332f50e..5651f6ae94c 100644 Binary files a/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack6-2022.png and b/pages/public_cloud/public_cloud_network_services/getting-started-07-creating-vrack/images/vrack6-2022.png differ