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

Implement the "setup" command for Docker installation via SSH #6

Open
wants to merge 30 commits into
base: trunk
Choose a base branch
from

Conversation

jorgecar
Copy link
Contributor

@jorgecar jorgecar commented Jun 6, 2023

This pull request addresses issue #5 by implementing the "setup" command, which acquires a server lock to prevent concurrent operations and facilitates the installation of Docker via SSH.

Changes Made

  • Developed a server lock mechanism to acquire and release locks for exclusive server access.
  • Implemented error handling to handle scenarios where the server lock cannot be acquired, providing informative error messages for troubleshooting.
  • Enhanced the "setup" command to detect the presence of Docker on the server.
  • Added functionality to install Docker using the appropriate package manager via SSH if it is not already installed.
  • Improved feedback and error messaging during the installation process to assist users in resolving any encountered issues.
  • Ensured proper release of the server lock upon completion or in case of any errors during the installation process33.

Testing done

  • Tested the "setup" command on various servers with different configurations to ensure successful server lock acquisition and Docker installation.
  • Validated the behavior of error handling and error messaging during the installation process.

@jorgecar jorgecar linked an issue Jun 6, 2023 that may be closed by this pull request
jorgecar added 17 commits June 13, 2023 14:12
This new method is used to get the first server too.
This way I avoid having to define the same constructor in all commands to inject the manifest.
- withOutput: this method active the stream output for the processes

- docker: is a shortcut for execute docker cli
Accepts a boolean parameter stream to know if the stream has to be written to the console.
The Command Output is an OutputStyle object which is more sophisticated than the ConsoleOutput object.

It also avoids the magic of bind the output object on the service provider.
It is required to declarate the withOutput method for all the Process objects
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.

Implement "setup" command for Docker installation via SSH
1 participant