---
# System prepended metadata

title: Q1

---

# Q1 [蔡] CL110-21
```bash!
$ vim ~/Robert1-rc
export OS_USERNAME=Robert1
export OS_PROJECT_NAME=Engineering
export OS_USER_DOMAIN_NAME=Operations
export OS_PROJECT_DOMAIN_NAME=Operations
export OS_AUTH_TYPE=password
export OS_PASSWORD=Flectrag1
```
```bash!
$ source ~/admin-rc
$ openstack project list
$ openstack domain list
$ openstack network list
$ openstack images list
```

# Q2 [] CL110-375 CL210-26
```bash!
$ openstack subnet show ctlplance-subnet
```

# Q3 [林] CL210-315 CL210-45
```bash!
$ ssh root@controller0
# ovs-vsctl list-ifaces br-int
o-hm0
ovn-3f678a-0
ovn-8e0b99-0
ovn-b8bd46-0
patch-br-int-to-provnet-275c889d-ef54-4a38-88ff-a7cedee11506
```

# Q4 [賴] CL210-145
```bash!
$ openstack workflow execution create tripleo.fernet_keys.v1.rotate_fernet_keys '{"container": "overcloud"}'
```

# Q5 [洪] CL210-Ch7

```bash!
$ openstack network create --provider-network-type vlan --provider-physical-network storage storagenet

$ openstack subnet create --dhcp --subnet-range=10.1.243.0/24 --allocation-pool=start=10.1.243.101,end=10.1.243.109 --network storagenet storage-subnet 
```

# Q6 [] CL210-99

 -->  ~/bar_rear_create_restore_images-controller.yaml

```yaml=
- become: true
  hosts: Controller
  name: Create the recovery images for the control plane
  roles:
  - role: backup-and-restore
```

# Q7 [吳] CL210-378
```bash!
$ openstack server migrate --live rbserver compute0.overcloud.example.com
```

# Q8 [文] CL110-326

```shell=
$ openstack server create --flavor m1.petite --image web 
    --nic net-id=engnet 
    --security-group ssh 
    --security-group web 
    --key-name webkey \
    --user-data /home/stack/cloud-init.sh \
    --wait \
    --property project=Engineering \
    webserver
    
$ openstack floating ip create --floating-ip-address 172.25.250.0/24
$ openstack floating ip list
$ openstack server add floating ip webserver 172.25.250.101
```

# Q9 [蔡] CL110-188
```bash!
$ openstack  volume create --size 2 storage
$ openstack server add volume webserver storage
```

# Q10 [林] CL110-423
```shell=
#cat <<EOF> env.yaml
parameters:
  image_name: web
  instance_name: Engineering
  key_name: webkey
  instance_flavor: m1.petite
  public_net: public
  private_net: engnet
  private_subnet: engsubnet
EOF

#. admin-rc
#openstack stack create -t web_server.yaml -e env.yaml --dry-run HeatStack
#openstack stack create -t web_server.yaml -e env.yaml  --wait HeatStack
```
    
# Q11 [賴] CL210-185
```bash!
 $ openstack image create \
 > --disk-format qcow2 \
 > --min-disk 10 \
 > --min-ram 2048 \
 > --file ~/finance-rhel-dns.qcow2 \
 > finance-rhel-dns
 
 ]$ openstack server create \
 > --flavor default \
 > --key-name example-keypair \
 > --nic net-id=finance-network1 \
 > --image finance-rhel-dns \
 > --security-group finance-dns \
 > --config-drive true \
 > --wait finance-dns1
```


# Q12 [洪] CL210-87

```
$ssh controller0.lab.example.net
$sudo -i

#Create user and set permission
    $podman exec -t rabbitmq-bundle-podman-0 rabbitmqctl add_user ash Flectrag1
    $podman exec -t rabbitmq-bundle-podman-0 rabbitmqctl set_permissions ash ".*" ".*" ".*"

#Enable trace
    $podman exec -t rabbitmq-bundle-podman-0 rabbitmqctl trace_on

#Determine the interface that RabbitMQ is listening on
    $ss -tnlp | grep :5672
```

# Q13 [吳] CL210-138
```bash!
$ openstack domain create Exam
$ 
```

# Q14 [文] CL210-162

```bash!
# podman exec -it nova_api  oslopolicy-policy-generator --namespace nova > nova_policy.txt
 
# vim  /var/lib/config-data/puppet-generated/nova/etc/nova/policy.json --> add rule:Engineers
 
# systemctl restart tripleo_nova_api
```

# Q15 [蔡] CL210-247
```bash!
# swift-ring-builder object.builder

```

# Q16 [林] CL110-229
```shell=
# . robertrc
# openstack container create warehouse
# wget http://materials.domain1.example.com/conf_data.tgz
# openstack object create warehouse/conf_data conf_data.tgz
```
# Q17 [賴] CL210-256
```bash!
$ manila create --name production-share1 --share-type cephfstype cephfs 5
```

# Q18 [洪] CL210-270

```
#Launch an instance in the Engineering project named eng_server1.
	$source admin-rc
	$openstack server create --flavor m1.petite --key-name webkey --image web --nic net-id=engnet --nic net-id=storagenet --user-data ~/manila-data.sh --config-drive true --wait eng_server1
#Associated floating IP.
	$openstack server add floating ip eng_server1 172.25.250.101

#Mount the share engineering_share on /mnt/ceph on the eng_server1 instance.
	$scp {cloud-user.keyring,ceph.conf} cloud-user@172.25.250.101:
	$manila share-export-location-list engineering_share --columns Path
	$ssh cloud-user@172.25.250.101
	$mkdir /mnt/ceph
	$curl -s -f -o /etc/yum.repos.d/ceph.repo http://sidecar.domain1.example.com/ceph.repo
	$ceph-fuse /mnt/ceph/ --id=cloud-user --conf=/home/cloud-user/ceph.conf --keyring=/home/cloud-user/cloud-user.keyring --client-mountpoint=/volumes/_nogroup/cea022a9-c00c-4003-b6f3-8fea2a49bd5f
```

# Q19 [吳] CL210-367
```bash!
$ openstack aggregate create com0_aggregate
$ openstack flavor create --ram 1024 --disk 10 --vcpus 2 --public default-hci
```

# Q20 [文] CL210-382

```bash!
$ openstack aggregate create Outspread 
$ openstack aggregate add host Outspread computehci0.overcloud.example.com 
$ openstack aggregate set --property distributed=true Outspread 
$ openstack aggregate show Outspread 
$ openstack flavor create --ram 1024 --disk 512m --vcpus 1 --public m1.tiny
$ openstack flavor set m1.tiny aggregate_instance_extra_specs=accordingly
$ openstack flavor show m1.tiny
```

# Q21 [蔡] CL210-156
```bash!
$ openstack role add --group developers --group-domain Lab --project support --project-domain Lab --inherited member
```

# Q22 [林] CL210-434
編修 YAML 檔案

# Q23 [賴] CL210-201
```bash!
# ip netns
```

