-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add getting started/development guide
- Loading branch information
1 parent
71b548d
commit 8d0ffe4
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
origin: | ||
image: "openshift/origin:v1.0.6" | ||
net: "host" | ||
privileged: true | ||
volumes: | ||
- /:/rootfs:ro | ||
- /var/run:/var/run:rw | ||
- /sys:/sys:ro | ||
- /var/lib/docker:/var/lib/docker:rw | ||
- /var/lib/openshift/openshift.local.volumes:/var/lib/openshift/openshift.local.volumes | ||
command: start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Local Development | ||
|
||
It's actually very simple to setup OpenShift locally. We'll use a docker image from Docker Hub. For more OpenShift-focused information, see [this guide](https://docs.openshift.org/latest/getting_started/administrators.html). | ||
|
||
First thing to do is to clone this git repo: | ||
|
||
``` | ||
$ git clone git@github.com:projectatomic/osbs-client.git | ||
$ cd osbs-client | ||
``` | ||
|
||
We have a docker-compose config to run OpenShift: | ||
|
||
``` | ||
$ docker-compose up -d | ||
``` | ||
|
||
In order to successfully build an image you need to have 3 things: | ||
|
||
1. permission to submit a build — for development it's fine to do this (never do that on a public system!): | ||
``` | ||
$ docker exec -ti $openshift_container bash | ||
$ oadm policy add-role-to-group edit system:unauthenticated system:authenticated | ||
``` | ||
|
||
|
||
2. buildroot image — see [this section](https://github.com/projectatomic/osbs-client/blob/master/docs/osbs_instance_setup.md#atomic-reactor) section in [deplyoment guide](https://github.com/projectatomic/osbs-client/blob/master/docs/osbs_instance_setup.md) | ||
|
||
3. make OpenShift API accessible so build can submit metadata once build is done: | ||
``` | ||
$ firewall-cmd --permanent --add-port 8443/tcp | ||
$ firewall-cmd --add-port 8443/tcp | ||
``` | ||
|
||
4. config for osbs-client; something like this should do | ||
``` | ||
[local] | ||
openshift_uri = https://172.17.42.1:8443/ | ||
sources_command = fedpkg sources | ||
registry_uri = <registry:5000> | ||
vendor = <this_company> | ||
authoritative_registry = <registry.example.com> | ||
build_host = <builder.example.com> | ||
architecture = x86_64 | ||
build_type = prod | ||
verify_ssl = false | ||
metadata_plugin_use_auth = false | ||
use_auth=false | ||
``` |