Skip to Content

Dokumentasi Lab-launching an Instance

Table of Contents

A. Membuat keystonerc

perhatikan tabel berikut tabel resources

1. Login Server Menggunakan SSH

  • #ssh -l root <ip_server> -p <port_ssh> -D 5000

2. Gunakan Keystone rc admin

  • source ~/keystonerc_admin

3. Buat Project dengan nama project1

  • openstack project create project1
[Penulisan] openstack project create <nama-project>

4. Buat User dengan nama user1

  • openstack user create --project project1 --password redhat user1
[penulisan] openstack user create --project <nama-project> \
--password <isi-password> <nama-user>

5. Beri role admin pada user di project project1

  • openstack role add --project project1 --user user1 admin
[penulisan] openstack role add --project <nama-project> \
--user <nama-user> <role>

6. Buat flavor berinama flavor1

spesifikasi ram 1024 dan disk 10 G

  • openstack flavor create flavor1 --ram 1024 --disk 10
[penulisan]
openstack flavor create <nama-flavor> --ram <ukuran-ram> --disk <ukuran-disk>

7. download image rhel dan buat image1 dan image2

  • wget -c http://repo.redhattalent.id:10280/image/rhel-server-7.8-x86_64-kvm-small-redhattalent.qcow2
  • openstack image create image1 --disk-format qcow2 --file rhel-server-7.8-x86_64-kvm-small-redhattalent.qcow2 --public
  • openstack image create image2 --disk-format qcow2 --file rhel-server-7.8-x86_64-kvm-small-redhattalent.qcow2 --public
[penulisan]
openstack image create <nama-image> \
--disk-format <type-format> --file <nama-file> --public

8. Buat keystone credential file untuk user user1.

  • nano /root/keystonerc_user1
unset OS_SERVICE_TOKEN 
export OS_USERNAME=user1 
export OS_PASSWORD=redhat 
export OS_AUTH_URL=http://10.10.X.3:5000/v2.0 
export PS1='[\u@\h \W(keystone_user1)]\$ ' 

export OS_TENANT_NAME=project1
export OS_REGION_NAME=RegionOne

simpan file di /root/keystonerc_user1

9. Gunakan keystonerc_user1

  • source ~/keystonerc_user1

10. Verifikasi project, user, flavor dan image yang dibuat

  • openstack project list
  • openstack flavor list
  • openstack image list
  • openstack user list

11. Buat Network Private dan subnet

buat network private nama net1, dan subnet nama subnet1 dengan ip network 192.168.0.0/24

  • openstack network create net1
  • openstack subnet create subnet1 --subnet-range 192.168.0.0/24 --no-dhcp --network net1
  • openstack network list
  • openstack subnet list

12. Buat instance

Buat instance dengan nama instance2 menggunakan flavor1 dan image1

  • openstack server create instance2 --flavor flavor1 --image image1 --wait
  • openstack server list

13. Buat instance

Buat instance dengan nama prod-instance dengan flavor1 dan image2

  • openstack server create prod-instance --flavor flavor1 --image image2 --wait
  • openstack server list

14. Hubungkan dengan console prod-instance

  • openstack console url show prod-instance
[penulisan] openstack console url show <nama-instance>

Gunakan browser untuk membuka console url yang ditampilkan

15. Dari instance Ping ke gateway

  • ping -c 192.168.0.2

16. Delete instance

Delete instance prod-instance dan instance2

  • openstack server delete prod-instance
  • openstack server delete instance2
  • openstack server list
comments powered by Disqus