Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build conduit-specific Grafana Docker image #679

Merged
merged 1 commit into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,37 +390,35 @@ build_architecture
"Dockerfile-base" [color=lightblue, style=filled, shape=rect];
"Dockerfile-go-deps" [color=lightblue, style=filled, shape=rect];
"controller/Dockerfile" [color=lightblue, style=filled, shape=rect];
"cli/Dockerfile" [color=lightblue, style=filled, shape=rect];
"cli/Dockerfile-bin" [color=lightblue, style=filled, shape=rect];
"grafana/Dockerfile" [color=lightblue, style=filled, shape=rect];
"proxy/Dockerfile" [color=lightblue, style=filled, shape=rect];
"proxy-init/Dockerfile" [color=lightblue, style=filled, shape=rect];
"proxy-init/integration-test/iptables/Dockerfile-tester" [color=lightblue, style=filled, shape=rect];
"proxy-init/integration_test/iptables/Dockerfile-tester" [color=lightblue, style=filled, shape=rect];
"web/Dockerfile" [color=lightblue, style=filled, shape=rect];

"proxy-init/integration-test/run_tests.sh" -> "proxy-init/integration-test/iptables/Dockerfile-tester";
"proxy-init/integration_test/run_tests.sh" -> "proxy-init/integration_test/iptables/Dockerfile-tester";

"_docker.sh" -> "_log.sh";

"_gcp.sh";
"_log.sh";
"_tag.sh";

"conduit" -> "docker-build-cli-bin";

"dep";

"docker-build" -> "docker-build-cli-bin";
"docker-build" -> "docker-build-controller";
"docker-build" -> "docker-build-web";
"docker-build" -> "docker-build-grafana";
"docker-build" -> "docker-build-proxy";
"docker-build" -> "docker-build-proxy-init";
"docker-build" -> "docker-build-cli";
"docker-build" -> "docker-build-web";

"docker-build-base" -> "_docker.sh";
"docker-build-base" -> "Dockerfile-base";

"docker-build-cli" -> "_docker.sh";
"docker-build-cli" -> "_tag.sh";
"docker-build-cli" -> "docker-build-cli-bin";
"docker-build-cli" -> "cli/Dockerfile";

"docker-build-cli-bin" -> "_docker.sh";
"docker-build-cli-bin" -> "_tag.sh";
"docker-build-cli-bin" -> "docker-build-base";
Expand All @@ -437,6 +435,10 @@ build_architecture
"docker-build-go-deps" -> "_tag.sh";
"docker-build-go-deps" -> "Dockerfile-go-deps";

"docker-build-grafana" -> "_docker.sh";
"docker-build-grafana" -> "_tag.sh";
"docker-build-grafana" -> "grafana/Dockerfile";

"docker-build-proxy" -> "_docker.sh";
"docker-build-proxy" -> "_tag.sh";
"docker-build-proxy" -> "proxy/Dockerfile";
Expand Down Expand Up @@ -481,7 +483,12 @@ build_architecture

"root-tag" -> "_tag.sh";

"test-cleanup";

"test-run";

".travis.yml" -> "_gcp.sh";
".travis.yml" -> "_tag.sh";
".travis.yml" -> "dep";
".travis.yml" -> "docker-build";
".travis.yml" -> "docker-pull";
Expand Down
1 change: 1 addition & 0 deletions bin/docker-build
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ $bindir/docker-build-controller
$bindir/docker-build-web
$bindir/docker-build-proxy-init
$bindir/docker-build-cli-bin
$bindir/docker-build-grafana

$bindir/docker-build-proxy
18 changes: 18 additions & 0 deletions bin/docker-build-grafana
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -eu

if [ $# -ne 0 ]; then
echo "no arguments allowed for $(basename $0), given: $@" >&2
exit 64
fi

bindir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
rootdir="$( cd $bindir/.. && pwd )"

. $bindir/_docker.sh
. $bindir/_tag.sh

dockerfile=$rootdir/grafana/Dockerfile

docker_build grafana "$(head_root_tag)" $dockerfile
2 changes: 1 addition & 1 deletion bin/docker-images
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ docker_image() {

tag=$(head_root_tag)

for img in proxy proxy-init controller web cli-bin ; do
for img in cli-bin controller grafana proxy proxy-init web ; do
docker_image "$img" "$tag"
done

Expand Down
2 changes: 1 addition & 1 deletion bin/docker-pull
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ bindir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

. $bindir/_docker.sh

for img in proxy proxy-init controller web cli-bin ; do
for img in cli-bin controller grafana proxy proxy-init web ; do
docker_pull "$img" "$tag"
done
2 changes: 1 addition & 1 deletion bin/docker-push
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ bindir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

. $bindir/_docker.sh

for img in proxy proxy-init controller web cli-bin ; do
for img in cli-bin controller grafana proxy proxy-init web ; do
docker_push "$img" "$tag"
done
2 changes: 1 addition & 1 deletion bin/docker-retag-all
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ bindir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

. $bindir/_docker.sh

for img in proxy proxy-init controller web cli-bin ; do
for img in cli-bin controller grafana proxy proxy-init web ; do
docker_retag "$img" "$from" "$to"
done
8 changes: 1 addition & 7 deletions cli/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ type installConfig struct {
WebImage string
PrometheusImage string
GrafanaImage string
TopLineDashboard string
DeploymentDashboard string
HealthDashboard string
ControllerReplicas uint
WebReplicas uint
PrometheusReplicas uint
Expand Down Expand Up @@ -67,10 +64,7 @@ func validateAndBuildConfig() (*installConfig, error) {
ControllerImage: fmt.Sprintf("%s/controller:%s", dockerRegistry, conduitVersion),
WebImage: fmt.Sprintf("%s/web:%s", dockerRegistry, conduitVersion),
PrometheusImage: "prom/prometheus:v2.1.0",
GrafanaImage: "grafana/grafana:5.0.4",
TopLineDashboard: install.TopLine,
DeploymentDashboard: install.Deployment,
HealthDashboard: install.Health,
GrafanaImage: fmt.Sprintf("%s/grafana:%s", dockerRegistry, conduitVersion),
ControllerReplicas: controllerReplicas,
WebReplicas: webReplicas,
PrometheusReplicas: prometheusReplicas,
Expand Down
3 changes: 0 additions & 3 deletions cli/cmd/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ func TestRender(t *testing.T) {
WebImage: "WebImage",
PrometheusImage: "PrometheusImage",
GrafanaImage: "GrafanaImage",
TopLineDashboard: "TopLineDashboard",
DeploymentDashboard: "DeploymentDashboard",
HealthDashboard: "HealthDashboard",
ControllerReplicas: 1,
WebReplicas: 2,
PrometheusReplicas: 3,
Expand Down
Loading