summaryrefslogtreecommitdiffstats
path: root/setup.sh
blob: b7d12b32167695cf6d1ef19c0a0f1e7817208bc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#! /bin/bash

. opts.sh


case "${1}" in
    all)
        ./setup.sh -i $inventory prepare || exit 1
        ./setup.sh -i $inventory openshift || exit 1
        ./setup.sh -i $inventory gluster || exit 1
        ./setup.sh -i $inventory configure || exit 1
        ./setup.sh -i $inventory projects || exit 1
        ;;
    local)
        apply playbooks/local.yml || exit 1
        ;;
    vm)
        apply playbooks/ands-vm-setup.yml || exit 1
        ;;
    vmconf)
        apply playbooks/ands-vm-conf.yml || exit 1
        ;;
    prepare)
        apply playbooks/ands-prepare.yml || exit 1
        ;;
    openshift)
        apply playbooks/openshift-install.yml || exit 1
        ;;
    gluster)
        apply playbooks/ands-gluster.yml || exit 1
        ;;
    configure)
        apply playbooks/openshift-setup.yml || exit 1
        ;;
    projects)
        apply playbooks/openshift-setup-projects.yml || exit 1
        ;;
    openshift-nodes)
        apply playbooks/openshift-add-nodes.yml || exit 1
        ;;
    nodes)
        ./setup.sh -i $inventory prepare || exit 1
        ./setup.sh -i $inventory openshift-nodes || exit 1
        ./setup.sh -i $inventory gluster || exit 1
        ./setup.sh -i $inventory configure || exit 1
        ;;
    openshift-masters)
        apply playbooks/openshift-add-masters.yml || exit 1
        ;;
    masters)
        ./setup.sh -i $inventory prepare || exit 1
        ./setup.sh -i $inventory openshift-masters || exit 1
        ./setup.sh -i $inventory gluster || exit 1
        ./setup.sh -i $inventory configure || exit 1
        ;;
    users)
        apply playbooks/openshift-setup-users.yml || exit 1
        ;;
    security)
        apply playbooks/openshift-setup-security.yml || exit 1
        ;;
    storage)
        apply playbooks/openshift-setup-storage.yml || exit 1
        ;;
    vpn)
        apply playbooks/openshift-setup-vpn.yml || exit 1
        ;;
    certs)
        apply playbooks/openshift-redeploy-certificates.yml --extra-vars "openshift_certificates_redeploy_ca=true" || exit 1
        ;;
    upgrade)
        apply playbooks/openshift-upgrade.yml || exit 1
        ;;    
    check)
        apply playbooks/maintain.yml || exit
        ;;
    setup)
        [ -n "$2" ] || usage "Specify that to setup"
        apply ands_openshift -e "subrole=$2"
        ;;
    *)
        apply $@ || exit 1
esac