Skip to content
Snippets Groups Projects
Unverified Commit deb4a610 authored by František Řezníček's avatar František Řezníček Committed by GitHub
Browse files

Merge pull request #10 from...

Merge pull request #10 from jan-krystof-csnt/1294-task-revize-hlavne-g2-dokumentace__priklady_pouziti

1294 task revize hlavne g2 dokumentace  priklady pouziti
parents 04781fef 17d34aa3
No related branches found
No related tags found
No related merge requests found
Pipeline #305985 failed
......@@ -31,11 +31,13 @@ default = "~/.ssh/id_rsa"
}
```
You can use OpenStack Provider, which is a tool for managing resources OpenStack supports via Terraform. Terraform has an advantage over Heat because it can be used also in other architectures, not only in OpenStack
You can use OpenStack Provider, which is a tool for managing resources OpenStack supports via Terraform. Terraform has an advantage over Heat because it can be used also in other architectures, not only in OpenStack.
For more detail, please refer to [https://registry.terraform.io/providers/terraform-provider-OpenStack/OpenStack/latest/docs](https://registry.terraform.io/providers/terraform-provider-OpenStack/OpenStack/latest/docs) and [https://www.terraform.io/intro/index.html](https://www.terraform.io/intro/index.html).
Also refer to [example of Terraform project](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/tree/master/clouds/g2/ostrava/general/terraform) responsible for creation of two tier infrastructure consisting of several VMs and setting up networking, security and storage.
## Heat
Heat is an OpenStack exclusive orchestration tool used for managing cloud resources. Just like Terraform it is capable of simplifying orchestration operations in your cloud infrastructure.
......
......@@ -14,3 +14,5 @@ Security rules in OpenStack serve as a Firewall. They are applied directly on VM
If you delete default egress rules, your virtual machine will not be able to send outgoing communication. To fix this, add a new egress rule with *any* IP protocol and port range, set Remote IP prefix to *0.0.0.0/0* (IPv4) or *::/0* (IPv6).
Example configuration is available on page [Managing security groups](../how-to-guides/managing-security-groups.md). For full CLI reference please refer to [OpenStack docs](https://docs.openstack.org/python-openstackclient/train/cli/command-objects/security-group.html).
Also refer to the [example of new Security group creation] (https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/blob/master/clouds/g2/ostrava/general/commandline/cmdline-demo.sh) containing custom rules within VM provisioning CLI example.
......@@ -93,6 +93,7 @@ an instance remotely is SSH. Using SSH requires a pair of keys - a public key an
openstack keypair create --public-key ~/.ssh/id_rsa.pub my-key1
```
Refer to the [example of Key Pair creation](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/blob/master/clouds/g2/ostrava/general/commandline/cmdline-demo.sh) within VM provisioning CLI example.
## Update Security Group
In MetaCentrum Cloud, all incoming traffic from external networks to virtual machine instances is blocked by default.
......@@ -142,7 +143,7 @@ your virtual machine via SSH from your local terminal.
__2.__ Verify:
```
openstack security group show default
```
```
## Create a Virtual Machine Instance
......@@ -253,6 +254,8 @@ Connect to the instance using **ssh username@floating-ip**.
More information about login options is described on the [Accessing Instances](../how-to-guides/accessing-instances.md) page.
Refer to complete [example of creation VM and its components](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/blob/master/clouds/g2/ostrava/general/commandline/cmdline-demo.sh).
!!! info
......
---
title: Attaching Network Interface
search:
exclude: false
---
# Attaching Network Interface
## Prerequisites
- Created [instance](../getting-started/creating-first-infrastructure.md).
## Attaching Interface
This guide shows how to attach additional interfaces to running instances. This approach can be used for both IPv4 and IPv6 networks.
!!! info
If you approach a problem with your IPv6 deployment, please refer to [IPv6 troubleshooting](../additional-information/ipv6-troubleshooting.md).
=== "GUI"
Go to **Project > Compute > Instances**. Click on the menu **Actions** on the instance you wish to change and click on **Attach interface**.
!!! example
![](/compute/openstack/images/networks/attach_interface.png)
In the **Network** dropdown menu select available IPv6 network.
!!! example
![](/compute/openstack/images/networks/ipv6_attach.png)
=== "CLI"
**Get ID of your VM, in this instance named my-vm**
```
VM_ID=$(openstack server list --name my-vm -f value -c ID)
```
**Create port for the network and add it to your VM**
```
openstack port create --network <my-network> --security-group default --host ${VM_ID} <my-port-name>
openstack server add port <VM_ID> <my-network>
```
Additional port configuration is available in [official CLI documentation](https://docs.openstack.org/python-openstackclient/train/cli/command-objects/port.html).
......@@ -56,3 +56,5 @@ We can create a virtual network in OpenStack for the project, which can be used
```
Additional subnet configuration is available in [official CLI documentation](https://docs.openstack.org/python-openstackclient/train/cli/command-objects/subnet.html).
Refer to complete [example of creation VM including networking](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/blob/master/clouds/g2/ostrava/general/commandline/cmdline-demo.sh).
......@@ -65,6 +65,8 @@ search:
Additional router configuration is available in [official CLI documentation](https://docs.openstack.org/python-openstackclient/train/cli/command-objects/router.html).
Also, refer to the [example of a router creation](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/blob/master/clouds/g2/ostrava/general/commandline/cmdline-demo.sh) is handled within creation of VM.
## Router External Gateway Assign
If you have no gateway on you router, you can assign a new one.
......@@ -93,6 +95,8 @@ If you have no gateway on you router, you can assign a new one.
Additional router configuration is available in [official CLI documentation](https://docs.openstack.org/python-openstackclient/train/cli/command-objects/router.html).
Also, refer to [example of a gateway creation](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/blob/master/clouds/g2/ostrava/general/commandline/cmdline-demo.sh) is handled within router setup.
## Router External Gateway Release
=== "GUI"
......
......@@ -46,6 +46,9 @@ Before you begin, you should have the following:
The `<external_network_name_or_id>` is an external IP address pool managed by OpenStack administrators. Full list of available floating IP address pools can be found in [Technical reference](../../technical-reference/brno-site/networking/#ipv4-group-floating-ips).
Additional floating IP configuration is available in [official CLI documentation](https://docs.openstack.org/python-openstackclient/train/cli/command-objects/floating-ip.html).
Also, refer to [example of how floating IP allocation](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/blob/master/clouds/g2/ostrava/general/commandline/cmdline-demo.sh) is handled within creation of VM.
## Assigning IP Address
......@@ -84,6 +87,7 @@ Before you begin, you should have the following:
Additional floating IP configuration is available in [official CLI documentation](https://docs.openstack.org/python-openstackclient/train/cli/command-objects/floating-ip.html).
Also, refer to [example of how floating IP assignment](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/blob/master/clouds/g2/ostrava/general/commandline/cmdline-demo.sh) is handled within creation of VM.
## Disassociating Floating IP
=== "Horizon"
......
......@@ -19,6 +19,8 @@ To use it, provide the username and hostname of the jump host as an argument to
ssh -J user@jump.host user@target.host
```
To get more detail how a bastion is set up within a cloud project, check the [example](https://gitlab.ics.muni.cz/cloud/g2/openstack-infrastructure-as-code-automation/-/tree/master/clouds/g2/ostrava/general/terraform/modules/2tier_public_bastion_private_vm_farm) scripted in Terraform.
### Setting Up VPN Tunnel Via Encrypted SSH With [sshuttle](https://github.com/sshuttle/sshuttle)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment