Oracle Clouds

https://www.youtube.com/watch?v=nFlFswEpwnA

Networking -> Virtualc Cloud Networks -> Create VCN


С помощью мастера


Name: Marley-VCN

CIDR BLOCK: 10.0.0.0/16


Default Security List for Marley-VCN

Ingress Rules

10.0.0.0/16 80


Compute -> Instances -> Create Instance

marley-instance

ubuntu 20


$ ssh [email protected]<public-ip>


Запускаю приложение на 80 порту


Networking -> Load Balancers -> Create Load Balancer

Marley-LB

Public

Virtual Cloud Network -> Marley-VCN

Subnet -> Public Subnet Marley

Next

Weighted Round Robin

Add Backends

Protocol TCP

Next

Listener Name: marley-listener_lb

HTTP

Create


VCN -> Default Security List for Marley-VCN

0.0.0.0/0

80


НИЧЕГО НЕ ЗАРАБОТАЛО!!!

Запускаю консоль в панели облаков Oracle


Set up to use the API

$ oci setup config


взять в левом верхнем углу Administration -> Tenancy Details $ cd ~/.oci/ $ cat oci_api_key_public.pem
Profile -> User Serttings -> API Keys -> Add API Key -> Paste Public Key
### Create cloud services for the Linux VM $ export TENANCY_OCID= $ oci iam compartment create \ --name testcompartment \ -c ${TENANCY_OCID} \ --description "test compartment for linux"
## Network setup for Linux VM $ export COMPARTMENT_ID=ocid1.compartment.oc1..aaaaaaaaeg3oy2tmo6dfr3v3n4u7gyjqp4bbksddbiasrx7wzzwmu6pynjra $ export DISPLAY_NAME="VCN Linux" $ export DNS_LABEL="VCNLINUX"
$ oci network vcn create \ --compartment-id ${COMPARTMENT_ID} \ --display-name ${DISPLAY_NAME} \ --dns-label ${DNS_LABEL} \ --cidr-block "10.0.0.0/24"
$ export VCN_ID=ocid1.vcn.oc1.eu-frankfurt-1.amaaaaaaljudzkaamc37ptz6iin2wa5u4nmgqz3ley22752tu5lkvuhwbvea $ export DEFAULT_SECURITY_LIST_ID=ocid1.securitylist.oc1.eu-frankfurt-1.aaaaaaaa7ql5dxwecflkulajs2wutvc7bsfvuie3y55xckwjrh6ktsflrfpa $ export DEFAULT_ROUTE_TABLE_ID=ocid1.routetable.oc1.eu-frankfurt-1.aaaaaaaauii3mw3rssclsm7dllz3pjivg7yekmnfrfxrjlqbsrmonzjav4ia
$ oci iam availability-domain list \ -c ${COMPARTMENT_ID}
$ export AVAILABILITY_DOMAIN=QBXU:EU-FRANKFURT-1-AD-1
$ export DISPLAY_NAME=subnetlinuxtest $ export DNS_LABEL=subnetlinuxtest $ oci network subnet create \ --vcn-id ${VCN_ID} \ -c ${COMPARTMENT_ID} \ --availability-domain ${AVAILABILITY_DOMAIN} \ --display-name ${DISPLAY_NAME} \ --dns-label ${DNS_LABEL} \ --cidr-block "10.0.0.0/24" \ --security-list-ids '["ocid1.securitylist.oc1.eu-frankfurt-1.aaaaaaaa7ql5dxwecflkulajs2wutvc7bsfvuie3y55xckwjrh6ktsflrfpa"]'
$ export SUBNET_ID=ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaarqrgq3slrfd4k6d6nb2fudjpp3uwogxrzru3tidl6oi2mlnxbwqa
### Craete Network Internet Gateway
$ export DISPLAY_NAME=LinuxGateWay $ export VCN_ID=LinuxGateWay
$ oci network internet-gateway create \ -c ${COMPARTMENT_ID} \ --is-enabled true \ --vcn-id ${VCN_ID} \ --display-name ${DISPLAY_NAME}
$ export GATEWAY_ID=ocid1.internetgateway.oc1.eu-frankfurt-1.aaaaaaaajungy23o6xt7bpdsrdvg3aexegk2dgowthv3ojm476mpvhbaheba
### Adding Route Rules to Route Table
$ oci network route-table update \ --rt-id ${DEFAULT_ROUTE_TABLE_ID} \ --route-rules '[ {"cidrBlock" : "0.0.0.0/0", "networkEntityId" : "ocid1.internetgateway.oc1.eu-frankfurt-1.aaaaaaaajungy23o6xt7bpdsrdvg3aexegk2dgowthv3ojm476mpvhbaheba"} ]'
## Set up and connect to the Linux VM
$ export DISPLAY_NAME="LinuxVMTest" $ export IMAGE_ID=ocid1.image.oc1.eu-frankfurt-1.aaaaaaaazixyfjdjd7vsnzsucbnvabadypmijraftu7t6jn5hroxgh35jhuq
$ oci compute image list \ -c ${COMPARTMENT_ID}
$ export AVAILABILITY_DOMAIN=QBXU:EU-FRANKFURT-1-AD-3
$ oci compute shape list \ -c ${COMPARTMENT_ID} \ --availability-domain ${AVAILABILITY_DOMAIN}
$ ssh-keygen -t rsa
$ oci compute instance launch \ --availability-domain ${AVAILABILITY_DOMAIN} \ -c ${COMPARTMENT_ID} \ --shape "VM.Standard.E2.1.Micro" \ --display-name ${DISPLAY_NAME} \ --image-id ${IMAGE_ID} \ --ssh-authorized-keys-file "/home/username/.ssh/id_rsa.pub" \ --subnet-id ${SUBNET_ID}
$ export INSTANCE_ID=ocid1.instance.oc1.eu-frankfurt-1.antheljtljudzkacvzoqzlcx3nkgraya434v4npmtnl7mdtabtylxpa4wcaa
$ oci compute instance list-vnics \ --instance-id ${INSTANCE_ID}

**См. Подробнее:** https://git.ir/pluralsight-provisioning-virtual-machines-on-oracle-compute-cloud/