Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/404.html b/404.html new file mode 100644 index 0000000000000..859ecf4d53a85 --- /dev/null +++ b/404.html @@ -0,0 +1,17 @@ + + +
+ + +We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
.buckconfig
",id:"re-configuration-in-buckconfig",level:2},{value:"RE platform configuration",id:"re-platform-configuration",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.useMDXComponents)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Buck2 can use services that expose\n",(0,r.jsx)(n.a,{href:"https://github.com/bazelbuild/remote-apis",children:"Bazel's remote execution API"})," in\norder to run actions remotely."]}),"\n",(0,r.jsxs)(n.p,{children:["Buck2 projects have been successfully tested for remote execution against\n",(0,r.jsx)(n.a,{href:"https://www.engflow.com/",children:"EngFlow"}),",\n",(0,r.jsx)(n.a,{href:"https://github.com/buildbarn/bb-remote-execution",children:"BuildBarn"})," and\n",(0,r.jsx)(n.a,{href:"https://www.buildbuddy.io",children:"BuildBuddy"}),". Sample project configurations for those\nproviders are available under\n",(0,r.jsx)(n.a,{href:"https://github.com/facebook/buck2/tree/main/examples/remote_execution",children:"examples/remote_execution"}),"."]}),"\n",(0,r.jsxs)(n.h2,{id:"re-configuration-in-buckconfig",children:["RE configuration in ",(0,r.jsx)(n.code,{children:".buckconfig"})]}),"\n",(0,r.jsxs)(n.p,{children:["Configuration for remote execution can be found under ",(0,r.jsx)(n.code,{children:"[buck2_re_client]"})," in\n",(0,r.jsx)(n.code,{children:".buckconfig"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Keys supported include:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"engine_address"})," - address to your RE's engine."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"action_cache_address"})," - address to your action cache endpoint."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"cas_address"})," - address to your content-addressable storage (CAS) endpoint."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"tls_ca_certs"})," - path to a CA certificates bundle. This must be PEM-encoded.\nIf none is set, a default bundle will be used. This path contains environment\nvariables using shell interpolation syntax (i.e. $VAR). They will be\nsubstituted before reading the file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"tls_client_cert"})," - path to a client certificate (and intermediate chain), as\nwell as its associated private key. This must be PEM-encoded. This path can\ncontain environment variables using shell interpolation syntax (i.e. $VAR).\nThey will be substituted before reading the file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"http_headers"})," - HTTP headers to inject in all requests to RE. This is a\ncomma-separated list of ",(0,r.jsx)(n.code,{children:"Header: Value"})," pairs. Minimal validation of those\nheaders is done here. This can contain environment variables using shell\ninterpolation syntax ($VAR). They will be substituted before reading the file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"instance_name"})," - an instance name to pass on execution, action cache, and CAS\nrequests."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Buck2 uses ",(0,r.jsx)(n.code,{children:"SHA256"})," for all its hashing by default. If your RE engine requires\nsomething else, this can be configured in ",(0,r.jsx)(n.code,{children:".buckconfig"})," as follows:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ini",children:"[buck2]\n# Accepts BLAKE3, SHA1, or SHA256\ndigest_algorithms = BLAKE3\n"})}),"\n",(0,r.jsx)(n.h2,{id:"re-platform-configuration",children:"RE platform configuration"}),"\n",(0,r.jsxs)(n.p,{children:["Next, your build will need an\n",(0,r.jsx)(n.a,{href:"https://buck2.build/docs/concepts/glossary/#execution-platform",children:"execution platform"}),"\nthat specifies how and where actions should be executed. For a sample platform\ndefinition that sets up an execution platform to utilize RE, take a look at the\n",(0,r.jsx)(n.a,{href:"https://github.com/facebook/buck2/blob/main/examples/remote_execution/engflow/platforms/defs.bzl",children:"EngFlow example"}),",\n",(0,r.jsx)(n.a,{href:"https://github.com/facebook/buck2/blob/main/examples/remote_execution/buildbarn/platforms/defs.bzl",children:"BuildBarn example"}),",\nor the\n",(0,r.jsx)(n.a,{href:"https://github.com/facebook/buck2/blob/main/examples/remote_execution/buildbuddy/platforms/defs.bzl",children:"BuildBuddy example"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To enable remote execution, configure the following fields in\n",(0,r.jsx)(n.a,{href:"https://buck2.build/docs/api/build/globals/#commandexecutorconfig",children:"CommandExecutorConfig"}),"\nas follows:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"remote_enabled"})," - set to ",(0,r.jsx)(n.code,{children:"True"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"local_enabled"})," - set to ",(0,r.jsx)(n.code,{children:"True"})," if you also want to run actions locally."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"use_limited_hybrid"})," - set to ",(0,r.jsx)(n.code,{children:"False"})," unless you want to exclusively run\nremotely when possible."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"remote_execution_properties"})," - other additional properties.","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["If the RE engine requires a container image, this can be done by setting\n",(0,r.jsx)(n.code,{children:"container-image"})," to an image URL, as is done in the example above."]}),"\n"]}),"\n"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,i.useMDXComponents)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},15680:(e,n,t)=>{t.r(n),t.d(n,{MDXContext:()=>l,MDXProvider:()=>h,mdx:()=>b,useMDXComponents:()=>u,withMDXComponents:()=>d});var r=t(96540);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(){return o=Object.assign||function(e){for(var n=1;n