-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
105 lines (89 loc) · 4.96 KB
/
.envrc
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/env bash
# This file is both used via direnv, as well as by directly sourcing it in a
# shell (when being run from CI).
if type source_up >/dev/null 2>/dev/null; then
# Using direnv; load any higher up .envrc
source_up || true
else
# (**)
PWD="$(unset CDPATH ; cd "$(dirname "${BASH_SOURCE[0]:-${KSH_VERSION:+${.sh.file}}${KSH_VERSION:-$0}}")" && pwd)"
fi
export FISSILE_GIT_ROOT=$PWD
# Get version information
. ${PWD}/bin/common/versions.sh
# The Docker repository name used for images, the registry itself, and the org to use.
# Note, this replaces "make/include/registry" and its IMAGE_* variables
export FISSILE_REPOSITORY=${FISSILE_REPOSITORY:-scf}
export FISSILE_DOCKER_REGISTRY="${FISSILE_DOCKER_REGISTRY:+${FISSILE_DOCKER_REGISTRY%/}/}"
export FISSILE_DOCKER_ORGANIZATION=${FISSILE_DOCKER_ORGANIZATION:-'splatform'}
# This is a comma separated list of paths to the local repositories
# of all the releases that make up HCF
FISSILE_RELEASE=""
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/diego-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/etcd-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/garden-runc-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/cf-mysql-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/cf-usb/cf-usb-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/cflinuxfs2-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/cf-opensuse42-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/cf-sle12-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/routing-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/hcf-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/grootfs-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/capi-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/loggregator"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/nats-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/consul-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/nfs-volume-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/binary-buildpack-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/dotnet-core-buildpack-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/go-buildpack-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/java-offline-buildpack-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/nodejs-buildpack-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/php-buildpack-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/python-buildpack-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/ruby-buildpack-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/buildpacks/staticfile-buildpack-release"
export FISSILE_RELEASE="${FISSILE_RELEASE#,}"
# Path to an HCF role manifest
export FISSILE_ROLE_MANIFEST="${PWD}/container-host-files/etc/hcf/config/role-manifest.yml"
# Path to a BOSH deployment manifest that contains light opinions
export FISSILE_LIGHT_OPINIONS="${PWD}/container-host-files/etc/hcf/config/opinions.yml"
# Path to a BOSH deployment manifest that contains dark opinions
export FISSILE_DARK_OPINIONS="${PWD}/container-host-files/etc/hcf/config/dark-opinions.yml"
# Path to a location where all fissile output is stored
# This will be ~/.fissile in vagrant
export FISSILE_WORK_DIR="${FISSILE_WORK_DIR:-${PWD}/output/fissile}"
# This is the location of the local BOSH cache
# You shouldn't need to override this
# This will be ~/.bosh/cache in vagrant
export FISSILE_CACHE_DIR="${FISSILE_CACHE_DIR:-${PWD}/output/bosh-cache}"
# Path to fissile binary (not actually used by fissile)
export FISSILE_BINARY="${FISSILE_BINARY:-${PWD}/output/bin/fissile}"
mkdir -p "$(dirname "${FISSILE_BINARY}")"
PATH="$(dirname "${FISSILE_BINARY}")${PATH:+:${PATH}}"
export PATH
# This is the configuration base prefix
export FISSILE_CONFIG_PREFIX=hcf
# We will persist compilation results to the VM here
export HCF_PACKAGE_COMPILATION_CACHE="${HCF_PACKAGE_COMPILATION_CACHE:-${PWD}/.fissile/compilation}"
# The following is for fish support: run this script as `bash $0 fish`, and it
# will print out the fish commands for you to source.
if test "${BASH_ARGV:+${BASH_ARGV[0]}}" = "fish" ; then
for var in $(env | grep -E '^(FISSILE_|HCF_)' | cut -d= -f1) ; do
echo "set -x ${var} '${!var}'"
done
fi
if ! type source_up >/dev/null 2>/dev/null; then
# Restore the variable from the start of the script
PWD="$(pwd)"
fi
# The fissile stemcell image that is used as the base
export FISSILE_STEMCELL=${FISSILE_STEMCELL:-splatform/fissile-stemcell-opensuse:$FISSILE_STEMCELL_VERSION}
# fissile build kube|helm (memory limits, output, env)
# TODO: We currently skip memory limits for development purposes
# The defaults are all for helm.
# The make/kube script performs overrides for kube output.
export FISSILE_USE_MEMORY_LIMITS=false
export FISSILE_OUTPUT_DIR="${FISSILE_OUTPUT_DIR:-${PWD}/helm}"
export FISSILE_DEFAULTS_FILE="bin/settings/certs.env,bin/settings/kube/ca.env"