English Chinese (Simplified) (zh_CN)
Now that you have an image created in your account you can launch a VM instance. You’ll have to specify several pieces of information in the command, such as instance flavor, network information, SSH key, etc...
You'll also need the Ignition config you created earlier. Here it is represented in the example command as `./example.ign`, which indicates a file in the current directory named `example.ign`.
Launching a VM instance
OPENSTACK_NETWORK=private
OPENSTACK_KEYPAIR=mykeypair # optional
OPENSTACK_FLAVOR=v1-standard-2
INSTANCE_NAME=myinstance # choose a name
openstack server create \
--key-name=$OPENSTACK_KEYPAIR \
--network=$OPENSTACK_NETWORK \
--flavor=$OPENSTACK_FLAVOR \
--image=$IMAGE \
--user-data ./example.ign \
$INSTANCE_NAME
Specifying `--key-name` is optional if you provide an SSH key in your Ignition config.
Monitor progress of the instance creation with `openstack server show $INSTANCE_NAME`.
Next, if you'd like to SSH into the instance from outside the OpenStack environment, you can assign a public IP to the instance:
Create and Assign a Floating IP
OPENSTACK_NETWORK=public
openstack floating ip create $OPENSTACK_NETWORK
FLOATING_IP=1.1.1.1 # from just created floating IP
openstack server add floating ip $INSTANCE_NAME $FLOATING_IP
You now should be able to SSH into the instance using the floating IP address.
Example connecting
ssh core@<ip address>