-
Notifications
You must be signed in to change notification settings - Fork 14
Created msi installer for windows #27
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
Conversation
|
cli/server/server.go
Outdated
@@ -142,4 +143,16 @@ func initLogging(c *config.Config) { | |||
if c.Trace { | |||
l.SetLevel(logrus.TraceLevel) | |||
} | |||
|
|||
dir, _ := os.Getwd() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do it only for windows, let's not touch other os
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md
Outdated
If you want to install harness-docker-runner as a service in windows please follow the bellow instructions. | ||
#### Installation | ||
* Download the msi (harness-docker-runner-svc.msi) from latest releases | ||
* Double click the msi to start the installation process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we see the permission error, let's put instruction for that
README.md
Outdated
* click Uninstall and finish. | ||
#### Additional Instructions | ||
* Service will automatically started even if you re-started your VM | ||
* You can manually Stop/Start the service from service menu tab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would the cusotmer need to manually stop or start? Document it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case if they did
README.md
Outdated
* open the cmd as administrator and run below command | ||
``` | ||
=== start the service === | ||
sc.exe create harness-docker-runner-svc binPath="Path/to/your/binary server" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure harness-docker-runner-svc doesn't exist before we do this.
binPath="absolute_path/to/your/harness-docker-runner.exe server"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sc.exe start harness-docker-runner-svc
README.md
Outdated
* Accept the liecence, click next and finish the installation. | ||
#### Uninstallation | ||
* Search and open add or remove programs from search menu | ||
* search for harness-docker-runner-svc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Harness-Docker-Runner
* Download the msi (harness-docker-runner-svc.msi) from latest releases | ||
* Double click the msi to start the installation process (If you see any error while opening the file please follow the instruction from below url) | ||
* https://answers.microsoft.com/en-us/windows/forum/all/this-installation-package-could-not-be/d6d913e9-aac7-429a-ac0d-c39ad3a7c5eb | ||
* Accept the liecence, click next and finish the installation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verifiy using curl http://localhost:3000/healthz
wix.json
Outdated
"hooks": [ | ||
{"when": "install", "command": "sc.exe create harness-docker-runner-svc binPath=\"[INSTALLDIR]lite-engine.exe server\" start=auto DisplayName=\"harness-docker-runner-svc\""}, | ||
{"when": "install", "command": "sc.exe start harness-docker-runner-svc"}, | ||
{"when": "uninstall", "command": "sc.exe query harness-docker-runner-svc"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of using inline command do, {"when": "uninstall", "batch-file": "uninstall.bat"}
README.md
Outdated
* open the cmd as administrator and run below command | ||
``` | ||
=== start the service === | ||
sc.exe create Harness-Docker-Runner binPath="Absolute Path/to/your/binary server" start=auto DisplayName="Harness-Docker-Runner" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure Harness-Docker-Runner doesn't exist before we do this.
binPath="absolute_path/to/your/harness-docker-runner.exe server"
f85a45f
to
c6e8308
Compare
Latest msi created using this code https://tmpfiles.org/4552062/harness-docker-runner-svc.msi |
handle uninstall case add instruction for msi service in readme add instruction add instruction add instruction correction fixed uninstall
) | ||
|
||
func main() { | ||
cli.Command() | ||
if runtime.GOOS == "windows" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just make sure that this works for both msi way and non-msi way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it works directly with .exe as well. Tested this with Devki
cli/server/server.go
Outdated
if RunTime.GOOS == "windows" { | ||
dir, _ := os.Getwd() | ||
logFilePath := dir + string(os.PathSeparator) + "harness-docker-runner-" + time.Now().Format("2-January-2006") + ".log" | ||
logrus.Errorln("Logs will be dumped to : " + logFilePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why error log ?
No description provided.