odubaj / taskotron / resultsdb

Forked from taskotron/resultsdb 4 years ago
Clone

bcfcc91 Add Dockerfile and OpenShift template

Authored and Committed by csomh 6 years ago
    Add Dockerfile and OpenShift template
    
    Summary:
    Add Dockerfile to build image from rpm and OpenShift template.
    
    Based on the work done by dcallagh for waiverdb[0].
    
    At this point the resultsdb image is looked for in the internal
    registry of the cluster.
    
    [0] <https://pagure.io/waiverdb/pull-request/46>
    
    Test Plan:
    1. Start and configure local OpenShift cluster:
        oc cluster up
        oc login -u system:admin
        oadm policy add-role-to-user system:registry developer
        oadm policy add-role-to-user system:image-builder developer
    
    2. Login to the internal registry of the cluster:
        oc login -u developer -p developer
        docker login -u developer -p $(oc whoami -t) 172.30.1.1:5000
    
    3. Build, tag and push resultsdb image to internal registry:
        docker build -f openshift/Dockerfile --tag resultsdb --build-arg resultsdb_rpm=resultsdb-2.0.2-1.fc25.noarch.rpm .
        docker tag resultsdb 172.30.1.1:5000/myproject/resultsdb:latest
        docker push 172.30.1.1:5000/myproject/resultsdb:latest
    
    4. Create environment from template:
        oc process -f openshift/resultsdb-test-template.yaml -p TEST_ID=123 -p RESULTSDB_APP_VERSION=latest | oc apply -f -
    
    Subscribers: tflink
    
    Differential Revision: https://phab.qa.fedoraproject.org/D1206
    
        
file added
+27
file added
+32