Comments (17)
Maybe we could name --machine-name
--hostname
instead so we can keep the shorter --name
for clusters?
I'm a bit hesitant changing flags, maybe we could add --cluster-name
as an alias of --name
so the old command still works but we can change the documentation to refer to the new flag.
from footloose.
Give that the machine name is really a template for several machines names, maybe we can add an s at the end to convey that: --hostnames
from footloose.
Should we verify that machines are not existing before to apply changes? Then return an error if it exists or restart them with the new config?
from footloose.
I was thing thinking the set
command would actually mutate the config file.
The config create
one is a bit special because it should be careful when overriding an existing file. With set
the user wants to modify something in an existing config file so we modify an existing one (add probably error if trying to set a field that doesn't exist.
I'm not sure how we would add a Machine
to an already existing config file. Maybe the whole config file editing needs to be thought through a bit more :)
We need to be able to:
- Modify fields of an already existing config file
- Add new
Machine
from footloose.
Yes :)
But I think some config fields are more complex. Admitting the file is already created and the machines are already launched. For example, if we change the machine name from "node%d" to "nodes%d". We should take care to firstly remove docker containers, otherwise, we lose the access to "node%d" from Footloose and we have to "Docker stop" manually the machines. No?
from footloose.
For the case you mention:
- We shouldn't stop the containers for a config change, the user will lose state (changes made to the filesystem, programs running, ...)
- We could error when the user is trying to change the configured hostname while machines are running, telling them machines should be removed before editing that field.
from footloose.
It makes sense
from footloose.
We need to be able to:
- Modify fields of an already existing config file
- Add new
Machine
What do you think of splitting theses two needs in two different sub-commands?
footloose config set
for modifying cluster config and machines
footloose config add
for adding new machines to the config
from footloose.
I was thinking something similar to you, yes :)
We have a decision to make: right now config create
creates both the cluster and the fist machine. add
would have similar commands for the remaining machines. We could have orthogonal commands (one to create the cluster, one to add machines) at the price of having to type two commands when creating a brand new cluster. But it may make more sense:
footloose config create [cluster] --name cluster-name
footooose config add [machine] --replicas 2 --image quay.io/footloose/fedora29
That said, we could still have create
create the first machine template because creating a cluster without machines isn't very useful. Not too sure what is the best option here, any opinion?
from footloose.
footloose config create [cluster] --name cluster-name
footooose config add [machine] --replicas 2 --image quay.io/footloose/fedora29
It is more clear about what happens behind. However, it can really be boring to type two commands.
I like the idea to have the footloose create config
still creating the first machine, then use add
to create the second one.
from footloose.
sounds good to me then :)
from footloose.
I will work on :)
I just would like to have the PR #151 merged to avoid conflict because I need some of the work from it
from footloose.
We are maybe talking too much about add
command in the set
subject but one problem I see is:
footloose create config
does not have a flag for the machine names, it only has for the cluster name.
Giving the possibility to give machine names for the add
command seems to break logic.
In my opinion, it could be useful to add the possibility to give machine name to footloose create config
and have a logical link in the flag names through commands.
Example:
footloose create config
renaming --name to --cluster-name flag + --machine-name flagadd
having --machine-name flag
Does it make sense?
from footloose.
oh, and also when adding a new machine, we have to check the name/hostname doesn't conflict with previous machine specs. If two specs have the same, say node%d
it'll confuse footloose (can't start all the machines).
We could also choose to remove that restriction by encoding the index of the spec into the docker container name: $cluster-$i-$hostname
, eg. cluster-0-node0
,
from footloose.
oh, and also when adding a new machine, we have to check the name/hostname doesn't conflict with previous machine specs. If two specs have the same, say
node%d
it'll confuse footloose (can't start all the machines).
Or we could accept changes even if there is conflict, then add this check in our config validation when we footloose start
, footloose stop
footloose create
, ... But I prefer your option 😛
We could also choose to remove that restriction by encoding the index of the spec into the docker container name:
$cluster-$i-$hostname
, eg.cluster-0-node0
,
I suspect that it stills have a conflict for the footloose ssh root@node0
?
Concerning the set
command
cluster:
name: clu2
privatekey: ""
machines:
- spec:
name: node%d
image: quay.io/footloose/fedora29
privileged: false
volumes: []
portmappings: []
cmd: ""
count: 3
I can correctly set for string
, int
and bool
values with a generic solution. But volumes and portmappings are arrays. It seems difficult to set an array. Should I avoid these two fields?
from footloose.
We could also choose to remove that restriction by encoding the index of the spec into the docker container name:
$cluster-$i-$hostname
, eg.cluster-0-node0
,I suspect that it stills have a conflict for the
footloose ssh root@node0
?
Yes indeed, ssh
has a problem with it too, oh well, seems like we need to enforce every machine spec has a different hostname.
Concerning the
set
commandcluster: name: clu2 privatekey: "" machines: - spec: name: node%d image: quay.io/footloose/fedora29 privileged: false volumes: [] portmappings: [] cmd: "" count: 3
I can correctly set for
string
,int
andbool
values with a generic solution. But volumes and portmappings are arrays. It seems difficult to set an array. Should I avoid these two fields?
Hum, I hadn't thought about volumes and port mappings :)
For them we could add CLI parameters that look like what docker run
does. For instance #80. So you could specify them with add
at least.
Maybe we could have add
sub-commands:
footloose config add machines --hostname worker%d --replicas 3
footloose config add portmapping cluster.spec[0] 8080:80
footloose config add volume cluster.spec[0] ...
from footloose.
Is this dead?
from footloose.
Related Issues (20)
- Couldn't downloads 0.6.4 from release page
- Ignite inspect package needs update for new Ignite VM Status version
- Ubuntu 20.04 image is not available HOT 2
- Creation fail doesn't emit error
- Failure when customizing the OS image with a complex RUN step HOT 1
- Global status command
- Stopping a footloose container leaves the system in hard to recover state
- footloose container binds to different ports on ipv4 and ipv6 for ssh HOT 1
- How DNS works in footloose powered container VMs? HOT 1
- support for apple silicon linux/arm64/v8 platform // multi-arch build HOT 2
- Footloose not working on WSL? HOT 5
- support static IP address in network config?
- footloose container fails to start after upgrading to Docker 4.3 HOT 3
- Any available images on Mac with M1 chip? HOT 3
- Ubuntu 22.04 - not accessible HOT 1
- Suggest to add "user" into Machine spec HOT 1
- Passing 'platform' to Docker daemon? HOT 1
- kex_exchange_identification: Connection closed by remote host HOT 1
- Non-unique /etc/machine-id on debian10
- Project still active? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from footloose.