[
https://issues.apache.org/jira/browse/BEAM-2880?focusedWorklogId=146787&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-146787
]
ASF GitHub Bot logged work on BEAM-2880:
----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Sep/18 15:43
Start Date: 22/Sep/18 15:43
Worklog Time Spent: 10m
Work Description: herohde closed pull request #6466: [BEAM-2880] Remove
gcemd and gcsproxy container images
URL: https://github.com/apache/beam/pull/6466
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/build.gradle b/build.gradle
index 2d06c37745c..ba30ee92c9d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -209,8 +209,6 @@ task goPreCommit() {
dependsOn ":beam-sdks-java-container:build"
dependsOn ":beam-sdks-python-container:build"
dependsOn ":beam-sdks-go-container:build"
- dependsOn ":beam-runners-gcp-gcemd:build"
- dependsOn ":beam-runners-gcp-gcsproxy:build"
}
task goPostCommit() {
diff --git a/runners/gcp/OWNERS b/runners/gcp/OWNERS
deleted file mode 100644
index 6270c9cfc97..00000000000
--- a/runners/gcp/OWNERS
+++ /dev/null
@@ -1,7 +0,0 @@
-# See the OWNERS docs at https://s.apache.org/beam-owners
-
-reviewers:
- - pabloem
- - herohde
- - lukecwik
- - aaltay
diff --git a/runners/gcp/gcemd/Dockerfile b/runners/gcp/gcemd/Dockerfile
deleted file mode 100644
index b8fa8aaf3e2..00000000000
--- a/runners/gcp/gcemd/Dockerfile
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# 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.
-###############################################################################
-
-FROM debian:stretch
-MAINTAINER "Apache Beam <[email protected]>"
-
-RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get install -y \
- ca-certificates \
- && \
- rm -rf /var/lib/apt/lists/*
-
-ADD target/linux_amd64/gcemd /opt/apache/beam/
-
-ENTRYPOINT ["/opt/apache/beam/gcemd"]
diff --git a/runners/gcp/gcemd/build.gradle b/runners/gcp/gcemd/build.gradle
deleted file mode 100644
index 1b0d3f8e07e..00000000000
--- a/runners/gcp/gcemd/build.gradle
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- */
-
-apply plugin: org.apache.beam.gradle.BeamModulePlugin
-applyGoNature()
-applyDockerNature()
-
-description = "Apache Beam :: Runners :: Google Cloud Platform :: GCE metadata
provisioning"
-
-// Figure out why the golang plugin does not add a build dependency between
projects.
-// Without the line below, we get spurious errors about not being able to
resolve
-// "./github.com/apache/beam/sdks/go"
-resolveBuildDependencies.dependsOn ":beam-sdks-go:build"
-
-dependencies {
- golang {
- // TODO(herohde): use "./" prefix to prevent gogradle use base github
path, for now.
- // TODO(herohde): get the pkg subdirectory only, if possible. We spend
mins pulling cmd/beamctl deps.
- build name: './github.com/apache/beam/sdks/go', dir:
project(':beam-sdks-go').projectDir
- test name: './github.com/apache/beam/sdks/go', dir:
project(':beam-sdks-go').projectDir
- }
-}
-
-golang {
- packagePath = 'github.com/apache/beam/runners/gcp/gcemd'
- build {
- targetPlatform = ['linux-amd64']
- outputLocation = './build/target/${GOOS}_${GOARCH}/gcemd'
- }
-}
-
-docker {
- name containerImageName(name: "gcemd")
- files "./build/"
-}
-// Ensure that making the docker image builds any required artifacts
-dockerPrepare.dependsOn build
diff --git a/runners/gcp/gcemd/main.go b/runners/gcp/gcemd/main.go
deleted file mode 100644
index 6c12907a2d2..00000000000
--- a/runners/gcp/gcemd/main.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// 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.
-
-// gcemd is a metadata-configured provisioning server for GCE.
-package main
-
-import (
- "flag"
- "log"
- "net"
-
- "cloud.google.com/go/compute/metadata"
- pb "github.com/apache/beam/sdks/go/pkg/beam/model/fnexecution_v1"
- "github.com/apache/beam/sdks/go/pkg/beam/provision"
- "golang.org/x/net/context"
- "google.golang.org/grpc"
-)
-
-var (
- endpoint = flag.String("endpoint", "", "Server endpoint to expose.")
-)
-
-func main() {
- flag.Parse()
- if *endpoint == "" {
- log.Fatal("No endpoint provided. Use
--endpoint=localhost:12345")
- }
- if !metadata.OnGCE() {
- log.Fatal("Not running on GCE")
- }
-
- log.Printf("Starting provisioning server on %v", *endpoint)
-
- jobID, err := metadata.InstanceAttributeValue("job_id")
- if err != nil {
- log.Fatalf("Failed to find job ID: %v", err)
- }
- jobName, err := metadata.InstanceAttributeValue("job_name")
- if err != nil {
- log.Fatalf("Failed to find job name: %v", err)
- }
- opt, err := metadata.InstanceAttributeValue("sdk_pipeline_options")
- if err != nil {
- log.Fatalf("Failed to find SDK pipeline options: %v", err)
- }
- options, err := provision.JSONToProto(opt)
- if err != nil {
- log.Fatalf("Failed to parse SDK pipeline options: %v", err)
- }
-
- info := &pb.ProvisionInfo{
- JobId: jobID,
- JobName: jobName,
- PipelineOptions: options,
- }
-
- gs := grpc.NewServer()
- pb.RegisterProvisionServiceServer(gs, &server{info: info})
-
- listener, err := net.Listen("tcp", *endpoint)
- if err != nil {
- log.Fatalf("Failed to listen to %v: %v", *endpoint, err)
- }
- log.Fatalf("Server failed: %v", gs.Serve(listener))
-}
-
-type server struct {
- info *pb.ProvisionInfo
-}
-
-func (s *server) GetProvisionInfo(ctx context.Context, req
*pb.GetProvisionInfoRequest) (*pb.GetProvisionInfoResponse, error) {
- return &pb.GetProvisionInfoResponse{Info: s.info}, nil
-}
diff --git a/runners/gcp/gcsproxy/Dockerfile b/runners/gcp/gcsproxy/Dockerfile
deleted file mode 100644
index 5ff9141f73a..00000000000
--- a/runners/gcp/gcsproxy/Dockerfile
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# 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.
-###############################################################################
-
-FROM debian:stretch
-MAINTAINER "Apache Beam <[email protected]>"
-
-RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get install -y \
- ca-certificates \
- && \
- rm -rf /var/lib/apt/lists/*
-
-ADD target/linux_amd64/gcsproxy /opt/apache/beam/
-
-ENTRYPOINT ["/opt/apache/beam/gcsproxy"]
diff --git a/runners/gcp/gcsproxy/build.gradle
b/runners/gcp/gcsproxy/build.gradle
deleted file mode 100644
index b0ab7d9e46a..00000000000
--- a/runners/gcp/gcsproxy/build.gradle
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- */
-
-apply plugin: org.apache.beam.gradle.BeamModulePlugin
-applyGoNature()
-applyDockerNature()
-
-description = "Apache Beam :: Runners :: Google Cloud Platform :: GCS artifact
proxy"
-
-// Figure out why the golang plugin does not add a build dependency between
projects.
-// Without the line below, we get spurious errors about not being able to
resolve
-// "./github.com/apache/beam/sdks/go"
-resolveBuildDependencies.dependsOn ":beam-sdks-go:build"
-
-dependencies {
- golang {
- // TODO(herohde): use "./" prefix to prevent gogradle use base github
path, for now.
- // TODO(herohde): get the pkg subdirectory only, if possible. We spend
mins pulling cmd/beamctl deps.
- build name: './github.com/apache/beam/sdks/go', dir:
project(':beam-sdks-go').projectDir
- test name: './github.com/apache/beam/sdks/go', dir:
project(':beam-sdks-go').projectDir
- }
-}
-
-golang {
- packagePath = 'github.com/apache/beam/runners/gcp/gcsproxy'
- build {
- targetPlatform = ['linux-amd64']
- outputLocation = './build/target/${GOOS}_${GOARCH}/gcsproxy'
- }
-}
-
-docker {
- name containerImageName(name: "gcsproxy")
- files "./build/"
-}
-// Ensure that making the docker image builds any required artifacts
-dockerPrepare.dependsOn build
diff --git a/runners/gcp/gcsproxy/main.go b/runners/gcp/gcsproxy/main.go
deleted file mode 100644
index 4123b6b6484..00000000000
--- a/runners/gcp/gcsproxy/main.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// 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.
-
-// gcsproxy is an artifact server backed by GCS and can run in either retrieval
-// (read) or staging (write) mode.
-package main
-
-import (
- "context"
- "flag"
- "log"
- "net"
-
- "github.com/apache/beam/sdks/go/pkg/beam/artifact/gcsproxy"
- pb "github.com/apache/beam/sdks/go/pkg/beam/model/jobmanagement_v1"
- "google.golang.org/grpc"
-)
-
-const (
- retrieve = "retrieve"
- stage = "stage"
-)
-
-var (
- mode = flag.String("mode", retrieve, "Proxy mode: retrieve or
stage.")
- endpoint = flag.String("endpoint", "", "Server endpoint to expose.")
- manifest = flag.String("manifest", "", "Location of proxy manifest.")
-)
-
-func main() {
- flag.Parse()
- if *manifest == "" {
- log.Fatal("No proxy manifest location provided. Use
--manifest=gs://foo/bar")
- }
- if *endpoint == "" {
- log.Fatal("No endpoint provided. Use
--endpoint=localhost:12345")
- }
-
- gs := grpc.NewServer()
-
- switch *mode {
- case retrieve:
- // Retrieval mode. We download the manifest -- but not the
- // artifacts -- eagerly.
-
- log.Printf("Starting retrieval proxy from %v on %v", *manifest,
*endpoint)
-
- md, err := gcsproxy.ReadProxyManifest(context.Background(),
*manifest)
- if err != nil {
- log.Fatalf("Failed to obtain proxy manifest %v: %v",
*manifest, err)
- }
- proxy, err := gcsproxy.NewRetrievalServer(md)
- if err != nil {
- log.Fatalf("Failed to create artifact server: %v", err)
- }
- pb.RegisterArtifactRetrievalServiceServer(gs, proxy)
-
- case stage:
- // Staging proxy. We update the blobs next to the manifest
- // in a blobs "directory".
-
- log.Printf("Starting staging proxy to %v on %v", *manifest,
*endpoint)
-
- proxy, err := gcsproxy.NewStagingServer(*manifest)
- if err != nil {
- log.Fatalf("Failed to create artifact server: %v", err)
- }
- pb.RegisterArtifactStagingServiceServer(gs, proxy)
-
- default:
- log.Fatalf("Invalid mode: '%v', want '%v' or '%v'", *mode,
retrieve, stage)
- }
-
- listener, err := net.Listen("tcp", *endpoint)
- if err != nil {
- log.Fatalf("Failed to listen to %v: %v", *endpoint, err)
- }
- log.Fatalf("Server failed: %v", gs.Serve(listener))
-}
diff --git a/settings.gradle b/settings.gradle
index 3ccdd4418c7..2c806ed0a47 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -44,10 +44,6 @@ include "beam-runners-flink_2.11-job-server"
project(":beam-runners-flink_2.11-job-server").dir =
file("runners/flink/job-server")
include "beam-runners-flink_2.11-job-server-container"
project(":beam-runners-flink_2.11-job-server-container").dir =
file("runners/flink/job-server-container")
-include "beam-runners-gcp-gcemd"
-project(":beam-runners-gcp-gcemd").dir = file("runners/gcp/gcemd")
-include "beam-runners-gcp-gcsproxy"
-project(":beam-runners-gcp-gcsproxy").dir = file("runners/gcp/gcsproxy")
include "beam-runners-gearpump"
project(":beam-runners-gearpump").dir = file("runners/gearpump")
include "beam-runners-google-cloud-dataflow-java"
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 146787)
Time Spent: 1h 20m (was: 1h 10m)
> Artifact server proxies
> -----------------------
>
> Key: BEAM-2880
> URL: https://issues.apache.org/jira/browse/BEAM-2880
> Project: Beam
> Issue Type: Improvement
> Components: beam-model
> Reporter: Henning Rohde
> Assignee: Henning Rohde
> Priority: Minor
> Labels: portability
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> As per https://s.apache.org/beam-fn-api-container-contract, we should add
> runner-agnostic (dockerized) artifact proxies for various runner
> environments. These proxies implement the server side of the artifact API.
> We'll likely need proxies for GCS, S3, Azure Storage, and local. If the
> proxies are implemented in a statically-linked language like Go, say, then
> they do not have a dependency footprint and can easily be used as native
> binaries or in dockerized form -- at the discretion of the runner.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)