[ 
https://issues.apache.org/jira/browse/BEAM-5436?focusedWorklogId=752383&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-752383
 ]

ASF GitHub Bot logged work on BEAM-5436:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Apr/22 17:10
            Start Date: 04/Apr/22 17:10
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on code in PR #17256:
URL: https://github.com/apache/beam/pull/17256#discussion_r841966657


##########
website/www/site/content/en/documentation/sdks/go-cross-compilation.md:
##########
@@ -0,0 +1,76 @@
+---
+type: languages
+title: "Go SDK Cross Compilation"
+---
+<!--
+Licensed 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.
+-->
+
+# Overview
+
+This page contains technical details for users starting Go SDK pipelines on 
machines that are not using a `linux` operating system, nor an `amd64` 
architecture.
+
+Go is a statically compiled language.
+To execute a Go binary on a machine, it must be compiled for the matching 
operating system and processor architecture.
+This has implications for how Go SDK pipelines execute on 
[workers](/documentation/glossary/#worker).
+
+# Development: using `go run`
+
+When starting your in development pipeline against a remote runner, you can 
use `go run` from your development environment.
+Tthe Go SDK will cross-compile your pipeline for `linux-amd64`, and use that 
as the pipeline's worker binary.
+
+Alternatively, some local runners support Loopback execution.
+Setting the flag `--environment_type=LOOPBACK` can cause the runner to connect 
back to the local binary to serve as a worker.
+This can simplify development and debugging, by avoiding hiding log output in 
a container.
+
+# Production: overriding the worker binary
+
+Go SDK pipeline binaries have a `--worker_binary` flag to set the path to the 
desired worker binary.
+This section will teach you how to use this flag for robust Go pipelines.
+
+In production settings, it's common to only have access to compiled artifacts.
+For Go SDK pipelines, you may need to have two: one for the launching 
platform, and one for the worker platform.
+
+In order to run a Go program on a specific platform, that program must be 
built targeting that platform's operating system, and architecture.
+The Go compiler is quick, and able to cross compile to many target architures, 
by setting the [`$GOOS` and `$GOARCH` environment 
variables](https://go.dev/doc/install/source#environment) for your build.

Review Comment:
   Whoopse, missed an `is`.



##########
website/www/site/content/en/documentation/sdks/go-cross-compilation.md:
##########
@@ -0,0 +1,76 @@
+---
+type: languages
+title: "Go SDK Cross Compilation"
+---
+<!--
+Licensed 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.
+-->
+
+# Overview
+
+This page contains technical details for users starting Go SDK pipelines on 
machines that are not using a `linux` operating system, nor an `amd64` 
architecture.
+
+Go is a statically compiled language.
+To execute a Go binary on a machine, it must be compiled for the matching 
operating system and processor architecture.
+This has implications for how Go SDK pipelines execute on 
[workers](/documentation/glossary/#worker).
+
+# Development: using `go run`
+
+When starting your in development pipeline against a remote runner, you can 
use `go run` from your development environment.
+Tthe Go SDK will cross-compile your pipeline for `linux-amd64`, and use that 
as the pipeline's worker binary.
+
+Alternatively, some local runners support Loopback execution.
+Setting the flag `--environment_type=LOOPBACK` can cause the runner to connect 
back to the local binary to serve as a worker.
+This can simplify development and debugging, by avoiding hiding log output in 
a container.
+
+# Production: overriding the worker binary
+
+Go SDK pipeline binaries have a `--worker_binary` flag to set the path to the 
desired worker binary.
+This section will teach you how to use this flag for robust Go pipelines.
+
+In production settings, it's common to only have access to compiled artifacts.
+For Go SDK pipelines, you may need to have two: one for the launching 
platform, and one for the worker platform.
+
+In order to run a Go program on a specific platform, that program must be 
built targeting that platform's operating system, and architecture.
+The Go compiler is quick, and able to cross compile to many target architures, 
by setting the [`$GOOS` and `$GOARCH` environment 
variables](https://go.dev/doc/install/source#environment) for your build.

Review Comment:
   Whoops, missed an `is`.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 752383)
    Time Spent: 2h 50m  (was: 2h 40m)

> Improve docs for Go SDK - getting started for non-linux
> -------------------------------------------------------
>
>                 Key: BEAM-5436
>                 URL: https://issues.apache.org/jira/browse/BEAM-5436
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go, website
>    Affects Versions: 0.5.0
>         Environment: darwin amd64
>            Reporter: Vitalii Tverdokhlib
>            Assignee: Robert Burke
>            Priority: P4
>              Labels: documentation
>             Fix For: Not applicable
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Cross-compiling error on Mac and staging_location required (even if 
> temp_location present]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to