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

docs: update docs with v1.0.0 changes #47

Merged
merged 4 commits into from
Apr 8, 2024

Conversation

mbshields
Copy link
Contributor

Updates with new CLI command and command options
New article on Dockerfile conversion
What's New additions for v1.0.0
Minor corrections

@@ -26,11 +29,12 @@
stacker [global options] command [command options] [arguments...]

VERSION:
stacker v0.40.1-e54a685 liblxc a330126b45c7c3b6fcf0f9ba6c1eda7bdb4e508a
stacker v1.0.0-rc4-8e267fc liblxc 727adc05220e9b8b594c5bc2124bef5b2e0abe7a
Copy link
Contributor

@mikemccracken mikemccracken Jan 10, 2024

Choose a reason for hiding this comment

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

maybe this should just be <version> and <liblxc commit hash>, since these won't directly match what's in the release?

Copy link
Contributor Author

@mbshields mbshields Jan 11, 2024

Choose a reason for hiding this comment

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

Your variables do not appear in the comment, but I think you mean this?
stacker <version> liblxc <digest>

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, sorry!


You can also declare variable substitutions in a separate file which is then included in the build command as in this example:

`stacker build --substitute-file <filename>`
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 an example of the file format somewhere that we could link to here? or just show an example directly here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added simple example

Copy link
Contributor

Choose a reason for hiding this comment

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

great, thanks


### Convert a Dockerfile for stacker

- A new [`stacker convert`](reference/stacker_cli.md#stacker-convert) command performs a conversion of a Dockerfile into a stacker.yaml file. During the conversion, some variables from the Dockerfile may be exported to a substitution file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- A new [`stacker convert`](reference/stacker_cli.md#stacker-convert) command performs a conversion of a Dockerfile into a stacker.yaml file. During the conversion, some variables from the Dockerfile may be exported to a substitution file.
- A new [`stacker convert`](reference/stacker_cli.md#stacker-convert) command performs a conversion of a Dockerfile into a stacker.yaml file. During the conversion, some variables from the Dockerfile may be exported to a substitution file to be used with the `--substitution-file` argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


### Specify a single working directory

- A new [`stacker`](reference/stacker_cli.md#stacker) command option, `work-dir`, sets the working directory for stacker's cache, OCI output, and rootfs output. The existing command options `stacker-dir`, `oci-dir`, and `roots-dir` can then be omitted or used to override the `work-dir` setting.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- A new [`stacker`](reference/stacker_cli.md#stacker) command option, `work-dir`, sets the working directory for stacker's cache, OCI output, and rootfs output. The existing command options `stacker-dir`, `oci-dir`, and `roots-dir` can then be omitted or used to override the `work-dir` setting.
- A new [`stacker`](reference/stacker_cli.md#stacker) command option, `--work-dir`, sets the working directory for stacker's cache, OCI output, and rootfs output. The existing command options `--stacker-dir`, `--oci-dir`, and `--roots-dir` can then be omitted or used to override the `--work-dir` setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


- A new [`stacker`](reference/stacker_cli.md#stacker) command option, `work-dir`, sets the working directory for stacker's cache, OCI output, and rootfs output. The existing command options `stacker-dir`, `oci-dir`, and `roots-dir` can then be omitted or used to override the `work-dir` setting.

### Import contents when no shell exists
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Import contents when no shell exists
### Import contents when no shell exists in the base image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

`config` key is a special type of entry in the root in the `stacker.yaml` file.
It cannot contain a layer definition, it is used to provide configuration
The `config` key is a special type of entry in the root of the `stacker.yaml` file.
It cannot contain a layer definition; it is used to provide configuration
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
It cannot contain a layer definition; it is used to provide configuration
It cannot contain an image definition; it is used to provide configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

`config` key is a special type of entry in the root in the `stacker.yaml` file.
It cannot contain a layer definition, it is used to provide configuration
The `config` key is a special type of entry in the root of the `stacker.yaml` file.
It cannot contain a layer definition; it is used to provide configuration
applicable for building all the layers defined in this file. For example,
Copy link
Contributor

Choose a reason for hiding this comment

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

layers -> images

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -221,16 +215,16 @@ applicable for building all the layers defined in this file. For example,

If the `prerequisites` list is present under the `config` key, stacker will
make sure to build all the layers in the stacker.yaml files found at the paths
Copy link
Contributor

Choose a reason for hiding this comment

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

layers ->images

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


### Publish specific layers

- By default, the [`stacker publish`](reference/stacker_cli.md#stacker-publish) command pushes all layers in a stacker.yaml file instead of only the required layers. Using a new command option, `layer <value>`, you can explicitly specify which layers are to be published. This command option can be specified multiple times, selecting each layer to be included.
Copy link
Contributor

Choose a reason for hiding this comment

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

i see that 'layer' is hard coded in the command arg. we should change that and change it here to say "image"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I keep "layers" in this paragraph until the code is changed?

Copy link
Contributor

Choose a reason for hiding this comment

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

sure, that's fine, unless @rchincha has a reason to leave the option as --layer, in which case we'll need to explain it here.

also, when we do change it, let's add the dashes so it reads --layer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When (if?) we change the argument name, should this section become "### Publish specific images"? And should all instances of 'layer' be changed then to 'image'?


USAGE:
stacker build [command options] [arguments...]
- Prior to v0.40.1, copying content into a layer permanently involved bind mounting a shell such as busybox and invoking appropriate commands using the `run` directive. Now `import` directive [allows](reference/stacker_file.md#import-dest) for the `dest` option to achieve the same.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Prior to v0.40.1, copying content into a layer permanently involved bind mounting a shell such as busybox and invoking appropriate commands using the `run` directive. Now `import` directive [allows](reference/stacker_file.md#import-dest) for the `dest` option to achieve the same.
- Prior to v0.40.1, copying content into an image permanently involved bind mounting a shell such as busybox and invoking appropriate commands using the `run` directive. Now `import` directive [allows](reference/stacker_file.md#import-dest) for the `dest` option to achieve the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


USAGE:
stacker build [command options] [arguments...]
- Prior to v0.40.1, copying content into an image permanently involved bind mounting a shell such as busybox and invoking appropriate commands using the `run` directive. Now `import` directive [allows](reference/stacker_file.md#import-dest) for the `dest` option to achieve the same.
Copy link
Contributor

Choose a reason for hiding this comment

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

I missed this earlier, but this paragraph is only relevant in the context of scratch images. you could always copy into an image without bind mounting a shell if your base image had a shell already.

maybe this should read "prior to v0.40.1, copying content into a scratch image ..."

Copy link
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

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

lgtm

@rchincha rchincha merged commit affffe8 into project-stacker:main Apr 8, 2024
3 checks passed
@mbshields mbshields deleted the docs_mishield_v100 branch April 15, 2024 23:07
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.

3 participants