summaryrefslogtreecommitdiff
path: root/docs/dev/how_to/building_and_installing.md
blob: 745b4fddbe4d4452d9aeaf7319d4fd5454ed9e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Building and Installing

Chef Infra can be built and installed in two distinct ways:

- A gem built from this repository and installed into your own Ruby installation
- A system native package containing its own Ruby built using our Omnibus packaging system

**NOTE:** As an end user, please download the [Chef Infra package](https://www.chef.io/downloads/tools/infra-client) for managing systems, or the [Chef Workstation package](https://www.chef.io/downloads/tools/workstation) for authoring Chef cookbooks and administering your Chef infrastructure.

We do not recommend for end users to install Chef from gems or build from source. The following instructions apply only to those developing the Chef Infra client.

## Building the Gem

### Prerequisite

- git
- C compiler, header files, etc.
- Ruby 2.6 or later

**NOTE:** Chef supports a large number of platforms, and there are many different ways to manage Ruby installs on each of those platforms. We assume you will install Ruby in a way appropriate for your development platform, but do not provide instructions for setting up Ruby.

### Building / Installing

Once you have your development environment configured, you can clone the Chef repository and install Chef:

```bash
git clone https://github.com/chef/chef.git
cd chef
bundle install
bundle exec rake install
```

## Building the Full System Native Package

To build Chef as a standalone package, we use the [omnibus](omnibus/README.md) packaging system.

To build:

```bash
git clone https://github.com/chef/chef.git
cd chef/omnibus
bundle install
bundle exec omnibus build chef
```

The prerequisites necessary to run omnibus itself are not documented in this repository. See the [Omnibus project repository](https://github.com/chef/omnibus) for additional details.