forked from toolshed/abra
Compare commits
1 Commits
add-waitin
...
fix-typo
Author | SHA1 | Date | |
---|---|---|---|
b36e3b28ce |
@ -48,7 +48,7 @@ for this you need to look at the "abra app upgrade <domain>" command.
|
|||||||
You may pass "--force" to re-deploy the same version again. This can be useful
|
You may pass "--force" to re-deploy the same version again. This can be useful
|
||||||
if the container runtime has gotten into a weird state.
|
if the container runtime has gotten into a weird state.
|
||||||
|
|
||||||
Chas mode ("--chaos") will deploy your local checkout of a recipe as-is,
|
Chaos mode ("--chaos") will deploy your local checkout of a recipe as-is,
|
||||||
including unstaged changes and can be useful for live hacking and testing new
|
including unstaged changes and can be useful for live hacking and testing new
|
||||||
recipes.
|
recipes.
|
||||||
`,
|
`,
|
||||||
|
@ -5,8 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"strings"
|
||||||
"os/signal"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"coopcloud.tech/abra/pkg/upstream/convert"
|
"coopcloud.tech/abra/pkg/upstream/convert"
|
||||||
@ -415,7 +414,7 @@ func deployServices(
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.Infof("Starting to poll for deployment status for: %s", appName)
|
logrus.Infof("waiting for services to converge: %s", strings.Join(serviceNames, ", "))
|
||||||
ch := make(chan error, len(serviceIDs))
|
ch := make(chan error, len(serviceIDs))
|
||||||
for serviceID, serviceName := range serviceIDs {
|
for serviceID, serviceName := range serviceIDs {
|
||||||
logrus.Debugf("waiting on %s to converge", serviceName)
|
logrus.Debugf("waiting on %s to converge", serviceName)
|
||||||
@ -432,7 +431,7 @@ func deployServices(
|
|||||||
logrus.Debugf("assuming %s converged successfully", serviceID)
|
logrus.Debugf("assuming %s converged successfully", serviceID)
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.Infof("Successfully deployed %s", appName)
|
logrus.Info("services converged 👌")
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -455,10 +454,6 @@ func WaitOnService(ctx context.Context, cl *dockerClient.Client, serviceID, appN
|
|||||||
errChan := make(chan error, 1)
|
errChan := make(chan error, 1)
|
||||||
pipeReader, pipeWriter := io.Pipe()
|
pipeReader, pipeWriter := io.Pipe()
|
||||||
|
|
||||||
sigintChannel := make(chan os.Signal, 1)
|
|
||||||
signal.Notify(sigintChannel, os.Interrupt)
|
|
||||||
defer signal.Stop(sigintChannel)
|
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
errChan <- progress.ServiceProgress(ctx, cl, serviceID, pipeWriter)
|
errChan <- progress.ServiceProgress(ctx, cl, serviceID, pipeWriter)
|
||||||
}()
|
}()
|
||||||
@ -470,14 +465,6 @@ func WaitOnService(ctx context.Context, cl *dockerClient.Client, serviceID, appN
|
|||||||
select {
|
select {
|
||||||
case err := <-errChan:
|
case err := <-errChan:
|
||||||
return err
|
return err
|
||||||
case <-sigintChannel:
|
|
||||||
return fmt.Errorf(fmt.Sprintf(`
|
|
||||||
Cancelling polling for %s, deployment is still continuing.
|
|
||||||
|
|
||||||
If you want to stop the deployment try:
|
|
||||||
abra app undeploy %s
|
|
||||||
|
|
||||||
`, appName, appName))
|
|
||||||
case <-time.After(timeout):
|
case <-time.After(timeout):
|
||||||
return fmt.Errorf(fmt.Sprintf(`
|
return fmt.Errorf(fmt.Sprintf(`
|
||||||
%s has not converged (%s second timeout reached).
|
%s has not converged (%s second timeout reached).
|
||||||
@ -494,7 +481,7 @@ And inspect the logs with:
|
|||||||
|
|
||||||
abra app logs %s
|
abra app logs %s
|
||||||
|
|
||||||
If a service is failing to even start, try to smoke out the error with:
|
If a service is failing to even start, try smoke out the error with:
|
||||||
|
|
||||||
abra app errors --watch %s
|
abra app errors --watch %s
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user