Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmohr/ceph-cinder-demo
Deploying ceph and cinder on openshift on a single node for demo purposes
https://github.com/rmohr/ceph-cinder-demo
Last synced: 21 days ago
JSON representation
Deploying ceph and cinder on openshift on a single node for demo purposes
- Host: GitHub
- URL: https://github.com/rmohr/ceph-cinder-demo
- Owner: rmohr
- License: apache-2.0
- Created: 2018-02-12T12:59:45.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-16T17:01:43.000Z (over 6 years ago)
- Last Synced: 2024-10-19T18:23:47.036Z (30 days ago)
- Language: Shell
- Homepage:
- Size: 83 KB
- Stars: 3
- Watchers: 4
- Forks: 4
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenShift and KubeVirt Multinode Demo
## Deploying OpenShift with Vagrant
This will create an OpenShift cluster with one manster and one node via
Vagrant:### OpenShift
```bash
make cluster-up
make cluster-openshift
```The deployment can take pretty long. Also you will not see much output from the
openshift installer while it is running. To see what is going on in the installer run```bash
vagrant ssh master -c "tailf /ansible.log"
```Once the deployment is done, you can directly talk to the master via `./oc.sh`:
```bash
$ ./oc.sh get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 3h v1.9.1+a0ce1bc657
node Ready 3h v1.9.1+a0ce1bc657
```**Note**: Right now we only support having a **single** master.
### Storage Provisioner
To deploy `storage` run
```
make cluster-storage
```Once it is done, you can see the storage deployed:
```bash
$ ./oc.sh get pods -n kube-system
NAME READY STATUS RESTARTS AGE
ceph-demo-0 7/7 Running 2 52m
```To test the installation, start a pod which requests storage from that
provisioner:```bash
$ ./oc.sh create -f examples/storage-pod.yaml
$ /oc.sh get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
demo-pvc Bound pvc-2d1a98e1-12ef-11e8-a1c4-525400cc240d 1Gi RWO standalone-cinder 24m
$ ./oc.sh get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-2d1a98e1-12ef-11e8-a1c4-525400cc240d 1Gi RWO Delete Bound default/demo-pvc standalone-cinder 24m
```### KubeVirt
To deploy `KubeVirt` run
```
make cluster-kubevirt
```Once it is done, you can see all KubeVirt pods deployed:
```bash
$ ./oc.sh get pods -n kube-system
NAME READY STATUS RESTARTS AGE
virt-controller-66d948c84-kmfxs 0/1 Running 0 17m
virt-controller-66d948c84-mmmnx 1/1 Running 0 17m
virt-handler-64sjz 1/1 Running 0 17m
virt-handler-ps8ds 1/1 Running 0 17m
```To test the installation, start a vm with alpine:
```bash
$ ./oc.sh create -f examples/vm.yaml
$ sleep 300 # We need to pull a lot when the first vm starts on a node
$ ./oc.sh get vms -o yaml | grep phase
phase: Running
```To connect to a VM:
```bash
./oc.sh console demo-vm # Serial console
./oc.sh vnc demo-vm # VNC
```To import and run a cirros vm:
```bash
$ ./oc.sh create -f examples/import-cirros.yaml
$ sleep 120 # The cirros disk image downloads into a PVC
$ ./oc.sh get pod disk-importer # Repeat until pod is Completed
$ ./oc.sh create -f examples/vm-cirros-clone.yaml
$ ./oc.sh get vms -o yaml | grep phase
phase: Running
```## ManageIQ - kubevirt provider configuration
To configure `KubeVirt provider` run
```
make cluster-miq
```Once it is done, you can see that service account was created
```bash
./oc.sh get sa
NAME SECRETS AGE
builder 2 20m
default 3 19m
deployer 2 20m
miq 2 19s
registry 3 14m
router 2 14m
```and offlinevms custom resource was created
```bash
./oc.sh get offlinevms
No resources found.
```In order to configure provider in `ManageIQ` there are two tokens needed by running
```bash
./oc.sh sa get-token -n management-infra management-admin./oc.sh sa get-token -n default miq
```## Deploying OpenShift on arbitrary nodes
First create an inventory:
```
[nodes]
node1 ansible_host=192.168.200.4 ansible_user=root
node2 ansible_host=192.168.200.3 ansible_user=root[master]
master ansible_host=192.168.200.2 ansible_user=root
```Save it in `myinventory`. Then run
```bask
ansible-playbook -i myinventory openshift.yaml
ansible-playbook -i myinventory storage.yaml
ansible-playbook -i myinventory kubevirt.yaml
``