Compare commits

...

10 Commits

Author SHA1 Message Date
636dc82258 chore: 0.4.x rc2
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-03 16:37:19 +01:00
66d5453248 docs: recommend more helper commands for deploy timeout 2022-01-03 16:33:28 +01:00
ba9abcb0d7 fix: increase converge timeout 2022-01-03 16:33:18 +01:00
a1cbf21f61 fix: handle "uknown" version on deployment
Fixes pre-deploy overview version listing.
2022-01-03 16:32:03 +01:00
bd1da39374 fix: show latest version when up-to-date 2022-01-03 16:31:30 +01:00
8b90519bc9 test: more manual test examples 2022-01-03 16:31:16 +01:00
65feda7f1d fix: dont lookup release notes if no version passed 2022-01-03 16:14:56 +01:00
64e223a810 fix: dont display non-existant release notes if no version 2022-01-03 16:14:44 +01:00
379e01d855 fix: use installer without progress bar [ci skip]
Doesn't look well when invoked from "bash -c '...'" when we run "abra
upgrade". The progress bar shoots down the page and you miss the intro
banner.
2022-01-02 20:39:11 +01:00
a421c0dca5 test: use new name [ci skip] 2022-01-02 20:18:37 +01:00
6 changed files with 31 additions and 19 deletions

View File

@ -113,7 +113,7 @@ recipes.
}
if len(availableUpgrades) == 0 && !internal.Force {
logrus.Info("no available upgrades, you're on latest ✌️")
logrus.Infof("no available upgrades, you're on latest (%s) ✌️", deployedVersion)
return nil
}
}

View File

@ -58,7 +58,7 @@ func DeployAction(c *cli.Context) error {
}
version := deployedVersion
if version == "" && !Chaos {
if version == "unknown" && !Chaos {
catl, err := recipe.ReadRecipeCatalogue()
if err != nil {
logrus.Fatal(err)
@ -86,14 +86,14 @@ func DeployAction(c *cli.Context) error {
}
}
if version == "" && !Chaos {
if version == "unknown" && !Chaos {
logrus.Debugf("choosing %s as version to deploy", version)
if err := recipe.EnsureVersion(app.Type, version); err != nil {
logrus.Fatal(err)
}
}
if version != "" && !Chaos {
if version != "unknown" && !Chaos {
if err := recipe.EnsureVersion(app.Type, version); err != nil {
logrus.Fatal(err)
}
@ -221,7 +221,7 @@ func NewVersionOverview(app config.App, currentVersion, newVersion, releaseNotes
}
}
if releaseNotes != "" {
if releaseNotes != "" && newVersion != "" {
fmt.Println()
fmt.Println(fmt.Sprintf("%s release notes:\n\n%s", newVersion, releaseNotes))
} else {
@ -250,6 +250,10 @@ func NewVersionOverview(app config.App, currentVersion, newVersion, releaseNotes
// GetReleaseNotes prints release notes for a recipe version
func GetReleaseNotes(recipeName, version string) (string, error) {
if version == "" {
return "", nil
}
fpath := path.Join(config.RECIPES_DIR, recipeName, "release", version)
if _, err := os.Stat(fpath); !os.IsNotExist(err) {

View File

@ -479,24 +479,28 @@ func WaitOnService(ctx context.Context, cl *dockerclient.Client, serviceID, appN
go io.Copy(ioutil.Discard, pipeReader)
timeout := 30 * time.Second
timeout := 50 * time.Second
select {
case err := <-errChan:
return err
case <-time.After(timeout):
return fmt.Errorf(fmt.Sprintf(`
%s has still not converged (%s second timeout reached)
%s has not converged (%s second timeout reached).
This does not necessarily mean your deployment has failed, it may just be that
the app is taking longer to deploy based on your server resources or network
latency. Please run the following the inspect the logs of your deployed app:
latency.
You can track latest deployment status with:
abra app ps --watch %s
And inspect the logs with:
abra app logs %s
If a service is failing to even start (run "abra app ps %s" to see what
services are running) there could be a few things. The follow command will
try to smoke those out for you:
If a service is failing to even start, try smoke out the error with:
abra app errors --watch %s

View File

@ -2,7 +2,7 @@
ABRA_VERSION="0.3.0-alpha"
ABRA_RELEASE_URL="https://git.coopcloud.tech/api/v1/repos/coop-cloud/abra/releases/tags/$ABRA_VERSION"
RC_VERSION="0.4.0-alpha-rc1"
RC_VERSION="0.4.0-alpha-rc2"
RC_VERSION_URL="https://git.coopcloud.tech/api/v1/repos/coop-cloud/abra/releases/tags/$RC_VERSION"
for arg in "$@"; do
@ -58,7 +58,7 @@ function install_abra_release {
checksum=$(echo "$checksums" | grep "$FILENAME" - | sed -En 's/([0-9a-f]{64})\s+'"$FILENAME"'.*/\1/p')
echo "downloading $ABRA_VERSION $PLATFORM binary release for abra..."
wget -q --show-progress "$release_url" -O "$HOME/.local/bin/.abra-download"
wget -q "$release_url" -O "$HOME/.local/bin/.abra-download"
localsum=$(sha256sum $HOME/.local/bin/.abra-download | sed -En 's/([0-9a-f]{64})\s+.*/\1/p')
echo "checking if checksums match..."
if [[ "$localsum" != "$checksum" ]]; then

View File

@ -61,9 +61,9 @@ $ABRA autocomplete zsh
# ========================================================================
# record command
# ========================================================================
$ABRA record new -p gandi -t A -n e2e -v 192.157.2.21 coopcloud.tech
$ABRA record list -p gandi coopcloud.tech | grep -q e2e
$ABRA -n record rm -p gandi -t A -n e2e coopcloud.tech
$ABRA record new -p gandi -t A -n int-core -v 192.157.2.21 coopcloud.tech
$ABRA record list -p gandi coopcloud.tech | grep -q int-core
$ABRA -n record rm -p gandi -t A -n int-core coopcloud.tech
# ========================================================================
# catalogue command
@ -86,11 +86,11 @@ $ABRA recipe lint gitea
# ========================================================================
# server command
# ========================================================================
$ABRA -n server new -p hetzner-cloud --hn e2e
$ABRA -n server new -p hetzner-cloud --hn int-core
$ABRA server ls | grep -q e2e
$ABRA server ls | grep -q int-core
$ABRA -n server rm -s -p hetzner-cloud --hn e2e
$ABRA -n server rm -s -p hetzner-cloud --hn int-core
# ========================================================================
# app command

View File

@ -33,6 +33,10 @@ wire up for testing in an automated way.
### easy mode
- `abra app ls -t <recipe>`
- `abra app ls -s <server>`
- `abra app ls -s <server> -t <recipe>`
- `abra app ls -s <server> -t <recipe> -S`
- `abra app config <app>`
- `abra app check <app>`
- `abra app ps <app>`