Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

feat: add "get-versions" command to replace "orchestrators" #448

Merged
merged 2 commits into from Feb 14, 2019

Conversation

mboersma
Copy link
Member

@mboersma mboersma commented Feb 6, 2019

Reason for Change:

The aks-engine orchestrators command is still generic and returns DCOS versions, for example, although aks-engine is Kubernetes-only.

This hides the orchestrators command and adds a get-versions command that calls the same code with the orchestrator argument hard-coded as Kubernetes.

There wasn't a consensus in #339 as to the name of the new command, so this is just my proposal, but I'm happy to change it based on your feedback.

Issue Fixed:

Fixes #339

Requirements:

Notes:

I tried to use Cobra's "alias" feature to avoid writing any code, but it didn't quite fit since the commands don't expose the same arguments. Hiding the orchestrators command but otherwise leaving it intact seems like the most polite way to replace it with a new command.

@mboersma mboersma added this to In progress in backlog Feb 6, 2019
@mboersma mboersma self-assigned this Feb 6, 2019
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like get-versions

lgtm

@CecileRobertMichon
Copy link
Contributor

any relevant documentation that should be updated?

I know there's at least one reference to the orchestrators command in upgrade.md

@codecov
Copy link

codecov bot commented Feb 6, 2019

Codecov Report

Merging #448 into master will increase coverage by 0.02%.
The diff coverage is 75%.

@@            Coverage Diff             @@
##           master     #448      +/-   ##
==========================================
+ Coverage   53.43%   53.46%   +0.02%     
==========================================
  Files          95       96       +1     
  Lines       14391    14406      +15     
==========================================
+ Hits         7690     7702      +12     
- Misses       6038     6040       +2     
- Partials      663      664       +1

@mboersma
Copy link
Member Author

mboersma commented Feb 6, 2019

any relevant documentation that should be updated?

I'll fix upgrade.md and do a general search for references to the orchestrators command.

Edit: docs are updated.

@mboersma
Copy link
Member Author

Here's what the help looks like after this PR:

$ ./bin/aks-engine help
AKS Engine deploys and manages Kubernetes clusters in Azure

Usage:
  aks-engine [flags]
  aks-engine [command]

Available Commands:
  completion    Generates bash completion scripts
  deploy        Deploy an Azure Resource Manager template
  generate      Generate an Azure Resource Manager template
  get-versions  Display info about supported Kubernetes versions
  help          Help about any command
  scale         Scale an existing Kubernetes cluster
  upgrade       Upgrade an existing Kubernetes cluster
  version       Print the version of AKS Engine

Flags:
      --debug                enable verbose debug logs
  -h, --help                 help for aks-engine
      --show-default-model   Dump the default API model to stdout

Use "aks-engine [command] --help" for more information about a command.

$ ./bin/aks-engine get-versions --help
Display supported Kubernetes versions and upgrade versions

Usage:
  aks-engine get-versions [flags]

Flags:
  -h, --help             help for get-versions
      --version string   Kubernetes version (optional)
      --windows          Kubernetes cluster with Windows nodes (optional)

Global Flags:
      --debug   enable verbose debug logs

@mboersma
Copy link
Member Author

mboersma commented Feb 14, 2019

Output of the command is identical to aks-engine orchestrators --orchestrator Kubernetes (which still works but doesn't show up in aks-engine help):

$ ./bin/aks-engine get-versions 
{
  "orchestrators": [
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.6.9",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.7.15"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.7.16"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.7.15",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.7.16"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.14"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.15"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.7.16",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.14"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.15"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.8.14",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.15"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.10"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.11"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.8.15",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.10"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.11"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.9.10",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.11"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.9"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.12"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.9.11",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.9"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.12"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.10.9",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.12"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.6"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.7"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.10.12",
      "default": true,
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.6"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.7"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.11.6",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.7"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.4"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.5"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.11.7",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.4"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.5"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.12.4",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.5"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.13.2"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.13.3"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.12.5",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.13.2"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.13.3"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.13.2",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.13.3"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.14.0-alpha.1"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.13.3",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.14.0-alpha.1"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.14.0-alpha.1"
    }
  ]
}

@jackfrancis
Copy link
Member

/lgtm

@jackfrancis
Copy link
Member

As a follow-up PR, we should clean up the output.

@acs-bot acs-bot merged commit 312ddd2 into Azure:master Feb 14, 2019
backlog automation moved this from In progress to Done Feb 14, 2019
@acs-bot
Copy link

acs-bot commented Feb 14, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis, mboersma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [jackfrancis,mboersma]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mboersma mboersma deleted the one-orchestrator-plz branch February 15, 2019 19:06
sylr pushed a commit to sylr/aks-engine that referenced this pull request Feb 28, 2019
* feat: "get-versions" command to replace "orchestrators"

* docs: replace mentions of "aks-engine orchestrators" command
juhacket pushed a commit to juhacket/aks-engine that referenced this pull request Mar 14, 2019
* feat: "get-versions" command to replace "orchestrators"

* docs: replace mentions of "aks-engine orchestrators" command
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
backlog
  
Done
Development

Successfully merging this pull request may close these issues.

aks-engine orchestrators shows DCOS/swarm orchestrators as available options
4 participants