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

Ensure that Windows users can build Porter #115

Closed
jeremyrickard opened this issue Jan 14, 2019 · 8 comments
Closed

Ensure that Windows users can build Porter #115

jeremyrickard opened this issue Jan 14, 2019 · 8 comments
Labels
meta Things necessary to make this project run day to day

Comments

@jeremyrickard
Copy link
Contributor

jeremyrickard commented Jan 14, 2019

We should ensure (and document how) Windows users can build Porter and contribute.

Implementation Notes:

  • Detect the OS and use either bash or powershell to switch out which build scripts to use (gotta be careful about this and WSL) OR
  • Switch to a docker based build entirely
@itowlson
Copy link
Contributor

Output of make build I currently get after doing a clean build on a fresh copy of the repo at commit 91f8231:

The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
make[1]: Entering directory `D:/GoProjects/src/github.com/deislabs/porter'
mkdir -p bin/mixins/porter
The syntax of the command is incorrect.
make[1]: *** [build-client] Error 1
make[1]: Leaving directory `D:/GoProjects/src/github.com/deislabs/porter'
make: *** [build-client] Error 2

@carolynvs carolynvs added the meta Things necessary to make this project run day to day label Jan 22, 2019
@carolynvs
Copy link
Member

Is the goal to have this work on WSL or also powershell?

@itowlson
Copy link
Contributor

I would like a Windows EXE build so I can invoke it from VS Code (which I have not tried running under WSL but which I will bet you a shiny groat no TWO shiny groats will not work). If the build has to happen in WSL rather than Windows/PS then so be it as long as what comes out is a Windows EXE... but things like Duffle build under Windows/PS (with make etc. installed) so it would be good to have parity.

@carolynvs
Copy link
Member

carolynvs commented Jan 28, 2019

Gotcha, then a Windows/PS compatible makefile you shall have! 🙇‍♀️

In the meantime, the CI builds churn out EXE's, you can grab them from:

https://deislabs.blob.core.windows.net/porter/canary/install-windows.ps1

See https://porter.sh/install/#windows for full install instructions and a PS instructions on Windows.

That link is for the canary build which is fresh from master, no waiting for a new tagged release. Otherwise change the URL to use latest if you want stable releases.

@itowlson
Copy link
Contributor

Whoa, well that is even easier than building it in Windows! Thank you!

@carolynvs
Copy link
Member

So sorry that I didn't share that sooner! When in doubt, yell and gesture wildly and demand that I live up to your expectations, @itowlson. 💖

@itowlson
Copy link
Contributor

itowlson commented Nov 3, 2019

Tried to build from source just now because I wanted to send a PR, and got this output:

D:\GoProjects\src\github.com\deislabs\porter [master ≡ +0 ~1 -0 !]> make build install
process_begin: CreateProcess(NULL, command -v packr2, ...) failed.
process_begin: CreateProcess(NULL, command -v dep, ...) failed.
process_begin: CreateProcess(NULL, command -v ajv, ...) failed.
curl -SLo /tmp/packr.tar.gz https://github.com/gobuffalo/packr/releases/download/v2.6.0/packr_2.6.0_windows_amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   622    0   622    0     0    622      0 --:--:-- --:--:-- --:--:--   925
100 3407k  100 3407k    0     0  1135k      0  0:00:03  0:00:03 --:--:-- 1346k
cd /tmp && tar -xzf /tmp/packr.tar.gz
install /tmp/packr2 D:\GoProjects/bin/
Enter the absolute path where the zip file is extracted/copied to:

(at this point the build stopped and waited for me to enter something, which I had no idea what to enter so I just hit return)

ERROR: Access to the registry path is denied.
ERROR: Access to the registry path is denied.

WARNING: The data being saved is truncated to 1024 characters.
ERROR: Access to the registry path is denied.

(at this point it stopped again and opened Notepad, and refused to continue until I closed Notepad. NOTEPAD FORSOOTH)

go generate ./...
cmd\porter\main.go:1: running "packr2": exec: "packr2": executable file not found in %PATH%
pkg\exec\exec.go:1: running "packr2": exec: "packr2": executable file not found in %PATH%
pkg\kubernetes\kubernetes.go:1: running "packr2": exec: "packr2": executable file not found in %PATH%
pkg\porter\porter.go:1: running "packr2": exec: "packr2": executable file not found in %PATH%
pkg\templates\templates.go:1: running "packr2": exec: "packr2": executable file not found in %PATH%
make: *** [generate] Error 1

@carolynvs
Copy link
Member

The new plan is to move from make to mage. The preliminary work to support that, and have windows agents in our CI is in #1321. After that is merged, I will start converting our makefile to mage.

@carolynvs carolynvs self-assigned this Nov 18, 2020
@carolynvs carolynvs added this to the 1.0 milestone Nov 18, 2020
@carolynvs carolynvs mentioned this issue Jan 4, 2021
3 tasks
@carolynvs carolynvs removed this from the 1.0 milestone May 10, 2021
@carolynvs carolynvs removed their assignment Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Things necessary to make this project run day to day
Projects
None yet
Development

No branches or pull requests

3 participants