@@ -5,7 +5,7 @@ provider for ManageIQ:
5
5
6
6
- using [ openshift-ansible] ( https://github.com/openshift/openshift-ansible ) to
7
7
deploy RPM packages on a cluster
8
- - using [ minishift ] ( https://github.com/minishift/minishift ) to deploy
8
+ - using [ CodeReady Containers ] ( https://github.com/crc-org/crc ) to deploy
9
9
openshift source to a vm
10
10
11
11
You can also use ` oc cluster up ` and configure it yourself (instructions not
@@ -38,14 +38,14 @@ example file for a cluster composed of two machines (Master and Node):
38
38
[OSEv3:children]
39
39
masters
40
40
nodes
41
-
41
+
42
42
[OSEv3:vars]
43
43
ansible_ssh_user =root
44
44
deployment_type =origin
45
-
45
+
46
46
[masters]
47
47
master_hostname openshift_scheduleable =True
48
-
48
+
49
49
[nodes]
50
50
master_hostname
51
51
node_hostname
@@ -61,82 +61,6 @@ logging use `openshift_hosted_metrics_deploy=True` and
61
61
$ ansible-playbook playbooks/byo/config.yml -i path/to/inventory/file
62
62
```
63
63
64
-
65
- ### Running with minishift
66
-
67
-
68
- For a simple single host setup for working with the openshift provider locally,
69
- you can use [ ` minishift ` ] ( https://github.com/minishift/minishift ) to run a
70
- local openshift 3.x instance.
71
-
72
-
73
- #### Requirements
74
-
75
- * [ ` minishift ` ] ( https://github.com/minishift/minishift ) >= 1.0.0.rc1 ([ Installation Instructions] ( https://docs.openshift.org/latest/minishift/getting-started/installing.html#installing-instructions ) )
76
- * Virtualization host of your choice (see supported hypervisors [ here] ( https://docs.openshift.org/latest/minishift/getting-started/installing.html#install-prerequisites ) )
77
-
78
-
79
- #### Quickstart
80
-
81
- Since VirtualBox is a consistent hypervisor across all platforms, this guide
82
- will assume that is being used, and updates to some commands might be
83
- necessary (most commands should be virtualization software agnostic and work
84
- regardless of the hypervisor).
85
-
86
- 1 . Download and enable the manageiq addon for minishift:
87
-
88
- ``` console
89
- $ mkdir -p ~/minishift/addons
90
- $ git clone https://gist.github.com/e2fac8be87ea0e9f429b6f5d75e02176 ~/minishift/addons/manageiq
91
- $ minishift addons install --force ~/minishift/addons/manageiq
92
- $ minishift addons enable manageiq
93
- ```
94
-
95
- 2 . Start minishift:
96
-
97
- ``` console
98
- $ minishift start --vm-driver virtualbox --openshift-version "v3.6.1"
99
- ```
100
-
101
- You might want to add ` --metrics --memory 5G ` . As of this writing that only supports hawkular and doesn't work on 3.7.0.
102
-
103
- See https://hub.docker.com/r/openshift/origin/tags/ for possible versions.
104
-
105
- 3 . Grab the minishift IP:
106
-
107
- ``` console
108
- $ minishift ip
109
- ```
110
-
111
- 4 . Add ` oc ` and/or ` docker ` to your PATH, configured to the cluster (auto-detects correct shell):
112
-
113
- ``` console
114
- $ eval $(minishift oc-env)
115
- $ eval $(minishift docker-env)
116
- ```
117
-
118
- 5 . Grab the token to access openshift through ` manageiq ` :
119
-
120
- ``` console
121
- $ oc login -u system:admin
122
- $ oc sa get-token -n management-infra management-admin
123
- ```
124
-
125
- 6 . Configure a provider in ManageIQ, filling in your token and IP where
126
- appropriate:
127
-
128
- ``` console
129
- $ bin/rails c
130
- irb> token = '<<YOUR_TOKEN_FROM_ABOVE_HERE>>'
131
- irb> host = '<<YOUR_IP_FROM_ABOVE_HERE>>'
132
- irb> os = ManageIQ::Providers::Openshift::ContainerManager
133
- irb> os.create(:name => "Minishift", :hostname => host, :port => 8443, :ipaddress => host, :zone => Zone.first, :storage_profiles => [], :security_protocol => "ssl-without-validation")
134
- irb> os.last.update_authentication(:bearer => {:auth_key => token, :save => true})
135
- ```
136
-
137
- Or through the UI if you prefer.
138
-
139
-
140
64
### Running with CodeReady Containers
141
65
142
66
@@ -147,20 +71,20 @@ vm openshift on your development machine) but is an OpenShift v4 cluster.
147
71
148
72
#### Requirements
149
73
150
- * [ ` CodeReady Containers ` ] ( https://github.com/code-ready /crc ) ([ Installation Instructions] ( https://code-ready.github.io /crc/#installation_gsg ) )
151
- * A compatible [ Operating System] ( https://code-ready.github.io /crc/#minimum-system-requirements-operating-system_gsg ) and the [ Required software packages ] ( https://code-ready.github.io/crc/#required-software-packages_gsg )
74
+ * [ ` CodeReady Containers ` ] ( https://github.com/crc-org /crc ) ([ Installation Instructions] ( https://crc.dev /crc/getting_started/getting_started/installing/ ) )
75
+ * A compatible [ Operating System] ( https://crc.dev /crc/getting_started/getting_started/installing/#_operating_system_requirements )
152
76
153
77
#### Quickstart
154
78
155
- 1 . [ Download] ( https://cloud .redhat.com/openshift/install/crc/installer-provisioned ) ane extract the latest release of CRC
79
+ 1 . [ Download] ( https://console .redhat.com/openshift/create/local ) ane extract the latest release of CRC
156
80
157
81
``` console
158
82
tar xfJ crc-linux-amd64.tar.xz
159
83
```
160
84
2. Copy the crc binary to a location on your PATH
161
85
162
86
```console
163
- sudo cp crc-linux-1.8 .0-amd64/crc /usr/local/bin
87
+ sudo install crc-linux-2.39 .0-amd64/crc /usr/local/bin/crc
164
88
which crc
165
89
/usr/local/bin/crc
166
90
```
@@ -184,31 +108,7 @@ vm openshift on your development machine) but is an OpenShift v4 cluster.
184
108
oc login -u kubeadmin -p KUBEADMING_PASSWORD https://api.crc.testing:6443
185
109
```
186
110
187
- 5. Now you can setup the management-infra/management-admin service account for use with ManageIQ
188
- ```console
189
- git clone https://gist.github.com/e2fac8be87ea0e9f429b6f5d75e02176 /tmp/manageiq_crc
190
- oc adm new-project management-infra --description="Management-Infrastructure"
191
- oc create serviceaccount management-admin -n management-infra
192
- oc create -f /tmp/manageiq_crc/management-infra-admin-cluster-role.json
193
- oc policy add-role-to-user -n management-infra admin -z management-admin
194
- oc policy add-role-to-user -n management-infra management-infra-admin -z management-admin
195
- oc adm policy add-cluster-role-to-user cluster-reader system:serviceaccount:management-infra:management-admin
196
- oc adm policy add-scc-to-user privileged system:serviceaccount:management-infra:management-admin
197
- oc adm policy add-cluster-role-to-user system:image-puller system:serviceaccount:management-infra:inspector-admin
198
- oc adm policy add-scc-to-user privileged system:serviceaccount:management-infra:inspector-admin
199
- oc adm policy add-cluster-role-to-user self-provisioner system:serviceaccount:management-infra:management-admin
200
- ```
201
-
202
- 6. Grab the console IP address and token to acess CRC through `ManageIQ`
203
- ```console
204
- cluster_ip=$(crc ip)
205
- service_account_token=$(oc sa get-token -n management-infra management-admin)
206
- ```
207
-
208
- 7. Configure a provider in ManageIQ
209
- ```console
210
- rails r "ManageIQ::Providers::Openshift::ContainerManager.create!(:name => 'CRC', :hostname => '$cluster_ip', :port => 6443, :zone => Zone.visible.first, :security_protocol => 'ssl-without-validation').update_authentication(:bearer => {:auth_key => '$service_account_token'})"
211
- ```
111
+ 5. Now you can setup the project and service account for use with ManageIQ by following the documentation: https://www.manageiq.org/docs/reference/latest/managing_providers/containers_providers/red_hat_openshift_providers.html
212
112
213
113
### Automated script to record new VCR
214
114
0 commit comments