Skip to content

Commit

Permalink
[antlir2][docs] document chef-solo and a few other features
Browse files Browse the repository at this point in the history
Summary: We need better docs

Test Plan: debugging_without_docs

Reviewed By: epilatow

Differential Revision: D50885410

fbshipit-source-id: 799a38963a2822b363b09cda0075e0bf038c04b2
  • Loading branch information
vmagro authored and facebook-github-bot committed Nov 1, 2023
1 parent 7ffd4af commit 35b618c
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
5 changes: 5 additions & 0 deletions antlir/antlir2/docs/docs/features/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Features",
"position": 20,
"collapsed": false
}
71 changes: 71 additions & 0 deletions antlir/antlir2/docs/docs/features/features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
sidebar_position: 1
---

# Features

"Features" is the term that `antlir2` uses to describe user-provided
instructions for how an image is to be built.

A common misconception is that the order in which features are written in buck
matter. They do not. Features are ordered by a
[dependency graph](../internals/depgraph.md), so you don't have to concern
yourself with the order in which you write your features.

## Self-explanatory features

:::note

In the near future, this section will be replaced with an auto-generated section
with the actual buck api docs.

:::

### `feature.install`

Install a source file/directory (or output of a buck rule) into the image

### `feature.ensure_dirs_exist`

Create an entire directory chain owned by the same `user:group` and the same
mode bits

### `feature.ensure_subdirs_exist`

Create some directories under an existing directory, where only the `user:group`
and mode bits of the `subdirs_to_create` matter, as long as the parent
directories exist.

### `feature.genrule`

Run an arbitrary command inside the image as any user that exists in the image.
This cannot provide you any of the safety that `antlir2` normally provides, so
should be used as a last resort.

### `feature.remove`

Delete a file/directory.

### `feature.ensure_(file|dir)_symlink`

Create a symlink to a file or directory.

### `feature.rpms_install`

Install RPMs by name, nevra or `.rpm` artifact.

### `feature.rpms_upgrade`

Upgrade RPMs to the newest allowed version.

### `feature.rpms_remove_if_exists`

Remove RPMs by name or nevra if they are installed.

### `feature.(user|group)_add`

Add a new user/group to `/etc/passwd` and friends.

<InternalOnly>
There are also some <a href="./fb">Meta-only internal features</a>
</InternalOnly>
2 changes: 1 addition & 1 deletion antlir/antlir2/docs/docs/recipes/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "Recipes",
"position": 20,
"position": 30,
"collapsed": false
}

0 comments on commit 35b618c

Please sign in to comment.