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

TOOLS-72 TOOLS-75 external tools validation #15

Merged
merged 3 commits into from
Nov 1, 2021

Conversation

psihachina
Copy link
Contributor

This commits adds:

  • external tools validation
  • installing SSM Agent automatically

Example:

Windows 11 SSM Agent
image

Ubuntu (wsl2) SSM Agent
asciicast

Ubuntu (wsl2) Docker
asciicast

Windows 11 Docker
image

Not tested on MasOS

Copy link
Contributor

@AutomationD AutomationD left a comment

Choose a reason for hiding this comment

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

Looks great (with some minor notes)

internal/commands/helpers.go Outdated Show resolved Hide resolved
internal/commands/base_init.go Outdated Show resolved Hide resolved
internal/commands/helpers.go Show resolved Hide resolved
Copy link
Contributor

@AutomationD AutomationD left a comment

Choose a reason for hiding this comment

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

Looks good, minor changes requested.

//Check Docker and SSM Agent
_, err = CheckCommand("docker", []string{"info"})
if err != nil {
return errors.New("docker is not running or is not installed")
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's

  1. Capitalize Docker
  2. Provide a link to Docker download/install instructions.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also let's provide to ssm plug-in installation a link in the place where we notify user to install the plugin manually.


err = DownloadSSMAgentPlugin()
if err != nil {
return fmt.Errorf("download SSM Agent error: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's capitalize Download


err = CleanupSSMAgent()
if err != nil {
return fmt.Errorf("cleanup SSM Agent error: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's capitalize first letter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -14,7 +14,7 @@ func (c *izeBuilderCommon) initConfig(filename string) (*config.Config, error) {
}

if path == "" {
return nil, errors.New("A Waypoint configuration file (waypoint.hcl) is required but wasn't found.")
return nil, errors.New("an Ize configuration file (ize.hcl) is required but wasn't found")
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's capitalize first letter

@@ -23,7 +23,7 @@ func (c *izeBuilderCommon) initConfig(filename string) (*config.Config, error) {
func (c *izeBuilderCommon) initConfigPath(filename string) (string, error) {
path, err := config.FindPath(filename)
if err != nil {
return "", fmt.Errorf("Error looking for a Ize configuration: %s", err)
return "", fmt.Errorf("error looking for a Ize configuration: %s", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we are switching to lowercase in the first word?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if runtime.GOOS == "darwin" {
command = []string{"rm", "-rf", "sessionmanager-bundle sessionmanager-bundle.zip"}
} else if runtime.GOOS == "linux" {
command = []string{"rm", "-rf", "session-manager-plugin.rpm"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we need -r here, it's just a file

@psihachina psihachina force-pushed the TOOLS-72-external-tools-validation branch from ba54234 to 3da92c8 Compare November 1, 2021 06:37
Copy link
Contributor

@AutomationD AutomationD left a comment

Choose a reason for hiding this comment

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

LGTM

@psihachina psihachina merged commit 32a0215 into main Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants