blob: c0f54b2b69fca8c5de52aa0636bb1babcbcbe43d [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
version: '3'
vars:
DOMAIN: "sciabarra.net"
tasks:
init:
cmds:
- |-
mkdir -p openshift
ssh-add id_rsa
env SSH_KEY='$(cat id_rsa.pub)' DOMAIN={{.DOMAIN}} \
envsubst <openshift-install-config.yaml >openshift/install-config.yaml
create:
deps:
- init
cmds:
- |-
openshift-install create cluster \
--dir openshift \
--log-level=debug
user:
- oc apply -f openshift-user.yaml
- oc adm policy add-role-to-user admin nuvolaris
- oc apply -f ../deploy/nuvolaris-permissions/whisk-crd.yaml
- oc apply -f openshift-aggregate.yaml
project:
- oc new-project nuvolaris --description="Nuvolaris" --display-name="Nuvolaris"
- oc project nuvolaris
config:
- oc login "$OPENSHIFT_API" --username="$OPENSHIFT_USER" --password="$OPENSHIFT_PASSWORD"
- oc whoami --show-token | docker login -u kubeadmin --password-stdin $OPENSHIFT_REGISTRY
- cp ~/.kube/config openshift.kubeconfig
- kubectl get nodes
destroy:
deps:
- init
cmds:
- >
openshift-install destroy cluster --dir openshift --log-level=debug