{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/installer/issues/332","repository_url":"https://api.github.com/repos/openshift/installer","labels_url":"https://api.github.com/repos/openshift/installer/issues/332/labels{/name}","comments_url":"https://api.github.com/repos/openshift/installer/issues/332/comments","events_url":"https://api.github.com/repos/openshift/installer/issues/332/events","html_url":"https://github.com/openshift/installer/pull/332","id":363884504,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MjA4Mzgx","number":332,"title":"data: Allow Terraform module bundling via vfsgen","user":{"login":"wking","id":209920,"node_id":"MDQ6VXNlcjIwOTkyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/209920?v=4","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"labels":[{"id":959732229,"node_id":"MDU6TGFiZWw5NTk3MzIyMjk=","url":"https://api.github.com/repos/openshift/installer/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":959730581,"node_id":"MDU6TGFiZWw5NTk3MzA1ODE=","url":"https://api.github.com/repos/openshift/installer/labels/size/XXL","name":"size/XXL","color":"ee0000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-09-26T07:02:12Z","updated_at":"2018-09-26T16:20:09Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/openshift/installer/pulls/332","html_url":"https://github.com/openshift/installer/pull/332","diff_url":"https://github.com/openshift/installer/pull/332.diff","patch_url":"https://github.com/openshift/installer/pull/332.patch"},"body":"The new `data` package works two ways:\r\n\r\n1. For devs, it loads the Terraform modules (now under `data/data`) from the disk.  If you execute your installer from a directory other than `data` (i.e. most of the time), you should set `OPENSHIFT_INSTALL_DATA` to point at the `data/data` directory.  That makes it easy to adjust the static files during development, because there's no need to rebuild after a tweak.\r\n\r\n2. For users, we compile the Terraform modules into the executable.  That makes it easy to distribute the file (no separate pieces or wrapping tarball).\r\n\r\nThis is very similar to #329.  The differences are:\r\n\r\n1. #329 always extracts from the tarball.  There's no \"load from the disk at runtime\" workflow.\r\n2. I'm vendoring a different package ;).\r\n3. The compiled-in binaries are slightly different sizes.  As of my b740463d688:\r\n\r\n    ```console\r\n    $ go generate ./data\r\n    writing assets_vfsdata.go\r\n    $ CGO_ENABLED=0 go build -tags release ./cmd/openshift-install\r\n    $ ls -l openshift-install \r\n    -rwxr-xr-x. 1 trking trking 37933716 Sep 25 23:59 openshift-install\r\n    ```\r\n\r\n    Compared with #329's:\r\n\r\n    ```console\r\n    $ ./hack/build.sh\r\n    $ ls -l bin/openshift-install \r\n    -rwxr-xr-x. 1 trking trking 39625166 Sep 26 00:00 bin/openshift-install\r\n    ```\r\n\r\n    But <2 MB isn't a large percentage change, so this is probably a wash.\r\n4. I've broken the old installer by shifting its Terraform modules around, deleting symlinks, etc.\r\n\r\nDev builds look like:\r\n\r\n```console\r\n$ CGO_ENABLED=0 go build ./cmd/openshift-install\r\n```\r\n\r\nwith invocations like:\r\n\r\n```console\r\n$ OPENSHIFT_INSTALL_DATA=data/data OPENSHIFT_INSTALL_CLUSTER_NAME=wking-testing ... ./openshift-install --dir wking --log-level debug cluster\r\n```\r\n\r\nRelease builds look like:\r\n\r\n```console\r\n$ go generate ./data\r\nwriting assets_vfsdata.go\r\n$ CGO_ENABLED=0 go build -tags release ./cmd/openshift-install\r\n```\r\n\r\nand the invocation is the same except you don't need to bother with `OPENSHIFT_INSTALL_DATA`.\r\n\r\nCC @crawford"},"comment":{"url":"https://api.github.com/repos/openshift/installer/issues/comments/424779682","html_url":"https://github.com/openshift/installer/pull/332#issuecomment-424779682","issue_url":"https://api.github.com/repos/openshift/installer/issues/332","id":424779682,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDc3OTY4Mg==","user":{"login":"crawford","id":368848,"node_id":"MDQ6VXNlcjM2ODg0OA==","avatar_url":"https://avatars3.githubusercontent.com/u/368848?v=4","gravatar_id":"","url":"https://api.github.com/users/crawford","html_url":"https://github.com/crawford","followers_url":"https://api.github.com/users/crawford/followers","following_url":"https://api.github.com/users/crawford/following{/other_user}","gists_url":"https://api.github.com/users/crawford/gists{/gist_id}","starred_url":"https://api.github.com/users/crawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawford/subscriptions","organizations_url":"https://api.github.com/users/crawford/orgs","repos_url":"https://api.github.com/users/crawford/repos","events_url":"https://api.github.com/users/crawford/events{/privacy}","received_events_url":"https://api.github.com/users/crawford/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T16:20:09Z","updated_at":"2018-09-26T16:20:09Z","author_association":"MEMBER","body":"Let's just get this thing in to remove the deadlock between this repo and openshift/release."}}
{"actor":{"display_login":"crawford"}}