-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Feature] - Adding Docker Swarm adapter #35
Comments
The main difference would be that the adapter would have some Swarm config. /**
* Run Container
*
* Creates and runs a new container, On success, it will return a string containing the container ID.
* On fail it will throw an exception.
*
* @param string[] $command
* @param string[] $volumes
* @param array<string, string> $vars
*/
abstract public function run(
string $image,
string $name,
array $command = [],
string $entrypoint = '',
string $workdir = '',
array $volumes = [],
array $vars = [],
string $mountFolder = '',
array $labels = [],
string $hostname = '',
bool $remove = false,
string $network = '',
int $replicas = 1): string; By adding the |
+1 |
In case this gets approved I can create the PR for it. |
@byawitz, thanks for raising this issue! π This is an interesting idea! I'm a little worried about adding this because it would make this adapter behave differently compared to the others π§ How would we be able to use these extra parameters or methods if the interface was the Adapter? |
Thanks for your replay @stnguyen90. For the Extra method parameter: For the Extra methods: The main idea would be
From what I'm seeing right now, the only function signature that will be changed will be the Then, in the Appwrite environment that value can be set from the _APP_FUNCTIONS_CPUS=0
_APP_FUNCTIONS_MEMORY=0
_APP_FUNCTIONS_REPLICAS=1 |
The main changes in the new PR are: The function The functions After working on that adapter, I realized that upfront it's not the best solution but with what Docker Swarm offers and the current structure of the adapter it should work. |
For the |
β‘ The Idea
Adding Docker Swarm CLI adapter to Utopia-PHP
orchestration
module.The adapter will be able to deploy containers to an existing swarm.
π Checklist
Implementing Adapter functions.
createNetwork
removeNetwork
networkConnect
networkDisconnect
listNetworks
getStats
pull
list
run
execute
remove
π Have you spent some time to check if this issue has been raised before?
π’ Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: