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

add scale flag for compose up #602

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

junnplus
Copy link
Member

@junnplus junnplus commented Dec 8, 2021

Signed-off-by: ye.sijun junnplus@gmail.com

Add scale flag for compose up.

./nerdctl compose up -d --scale wordpress=3
INFO[0000] Creating network nerdctl_default
INFO[0000] Ensuring image mariadb:10.5
INFO[0001] Ensuring image wordpress:5.7
INFO[0001] Creating container nerdctl_wordpress_3
INFO[0001] Creating container nerdctl_wordpress_2
INFO[0001] Creating container nerdctl_wordpress_1
INFO[0001] Creating container nerdctl_db_1

@AkihiroSuda
Copy link
Member

Thanks, could you also update README.md?
Adding tests would be also appreciated.

@junnplus junnplus marked this pull request as draft December 8, 2021 13:12
@junnplus junnplus force-pushed the compose-up-scale branch 3 times, most recently from 91226d2 to 4777668 Compare December 10, 2021 08:21
@junnplus junnplus marked this pull request as ready for review December 10, 2021 08:39
@AkihiroSuda AkihiroSuda added this to the v0.15.0 milestone Dec 10, 2021
pkg/composer/logs.go Outdated Show resolved Hide resolved
pkg/composer/up.go Outdated Show resolved Hide resolved
@@ -50,7 +51,7 @@ type Options struct {
DebugPrintFull bool // full debug print, may leak secret env var to logs
}

func New(o Options) (*Composer, error) {
func New(o Options, client *containerd.Client) (*Composer, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we put client to Options struct?

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer to separate them, they don’t seem to be affiliation.

Signed-off-by: ye.sijun <junnplus@gmail.com>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit b72b5ca into containerd:master Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants