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

Drop CentOS 8 and CentOS 7 boxes #1826

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ skip_list:
extra_vars:
pipeline_type: foreman
pipeline_version: nightly
pipeline_os: centos8-stream
pipeline_os: centos9-stream

# Mock roles in order to pass ansible-playbook --syntax-check
mock_roles:
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,24 @@ When this is complete, simply follow the next section of this README to try out
Spin up your box and start using the latest nightly build of Foreman:

```sh
vagrant up centos8-stream-foreman-nightly
vagrant up centos9-stream-foreman-nightly
```

Access the CLI by first connecting to the box via SSH:

```sh
vagrant ssh centos8-stream-foreman-nightly
vagrant ssh centos9-stream-foreman-nightly
```

To access the WebUI, it's helpful to have the vagrant-hostmanager plugin installed, so that your Workstation will automatically be able to resolve the hostname of the box to its IP address.

Then you can simply open your browser and navigate to `https://centos8-stream-foreman-nightly.<HOSTNAME>.example.com` where `<HOSTNAME>` is replaced by the shortname of your workstation. The first time you do this you will need to accept the self-signed certicate.
Then you can simply open your browser and navigate to `https://centos9-stream-foreman-nightly.<HOSTNAME>.example.com` where `<HOSTNAME>` is replaced by the shortname of your workstation. The first time you do this you will need to accept the self-signed certicate.

By default, `forklift` deploys Foreman with `admin`/`changeme` as username and password.

### Katello Nightly Box

Katello nightly boxes are available as well; simply change `centos8-stream-foreman-nightly` to `centos8-stream-katello-nightly` and the steps are otherwise exactly the same as above.
Katello nightly boxes are available as well; simply change `centos9-stream-foreman-nightly` to `centos9-stream-katello-nightly` and the steps are otherwise exactly the same as above.

### Additional Documentation

Expand All @@ -104,7 +104,7 @@ sed -i "s/<REPLACE ME>/GITHUB_NICK/g" vagrant/boxes.d/99-local.yaml
Bring up the Katello Development Box:

```sh
vagrant up centos8-katello-devel
vagrant up centos9-katello-devel
```

Once the box is running, you can access the shell via SSH and modify the source code in the `~/foreman` and `~/katello` directories. Then start the application to preview your changes:
Expand All @@ -114,9 +114,9 @@ cd ~/foreman
bundle exec foreman start
```

Before you can access the WebUI, you must first accept the self-signed certificate on port 3808 by visiting `https://centos8-katello-devel.<HOSTNAME>.example.com:3808` in your browser.
Before you can access the WebUI, you must first accept the self-signed certificate on port 3808 by visiting `https://centos9-katello-devel.<HOSTNAME>.example.com:3808` in your browser.

Then, navigate to `https://centos8-katello-devel.<HOSTNAME>.example.com/` to access the WebUI and preview your changes.
Then, navigate to `https://centos9-katello-devel.<HOSTNAME>.example.com/` to access the WebUI and preview your changes.

As above, `<HOSTNAME>` refers to the shortname of your hypervisor.

Expand Down Expand Up @@ -174,11 +174,11 @@ hostmanager_ip_resolver_device: 'eth1'

### Adding Custom Boxes

Sometimes you want to spin up the same box type (e.g. centos8-katello-devel) from within the forklift directory. While this can be added to the Vagrantfile directly, updates to the forklift repository could wipe out your local changes. To help with this, you can define a custom box re-using the configuration within the Vagrantfile. To do so, create a `99-local.yaml` file in vagrant/boxes.d/. For example, to create a custom box on CentOS 8 Stream with nightly and run the installers reset command:
Sometimes you want to spin up the same box type (e.g. centos9-katello-devel) from within the forklift directory. While this can be added to the Vagrantfile directly, updates to the forklift repository could wipe out your local changes. To help with this, you can define a custom box re-using the configuration within the Vagrantfile. To do so, create a `99-local.yaml` file in vagrant/boxes.d/. For example, to create a custom box on CentOS 9 Stream with nightly and run the installers reset command:

```yaml
my-nightly-staging:
box: centos8-stream
box: centos9-stream
ansible:
playbook: playbooks/katello.yml
variables:
Expand Down Expand Up @@ -225,7 +225,7 @@ Example with custom networking, static IP on custom libvirt network:

```yaml
static:
box: centos8
box: centos9-stream
hostname: mystatic.box.com
networks:
- type: 'private_network'
Expand All @@ -239,7 +239,7 @@ Example with custom libvirt management network:

```yaml
static:
box: centos8
box: centos9-stream
hostname: mystatic.box.com
libvirt_options:
management_network_address: 172.23.99.0/24
Expand All @@ -251,8 +251,8 @@ Do not forget to set openstack API credentials.
To use openstack provider as default look [here](https://www.vagrantup.com/docs/providers/default.html).

```yaml
openstack-centos8:
image_name: 'Centos8'
openstack-centos9-stream:
image_name: 'Centos9'
username: 'centos' #root by default
hostname: 'john-doe'
openstack_flavor: 'm1.medium'
Expand All @@ -266,7 +266,7 @@ Example with sshfs mounting folder from guest to host:

```yaml
with-sshfs:
box: centos8
box: centos9-stream
sshfs:
host_path: '/some/host/path'
guest_path: '/some/guest/path'
Expand All @@ -279,7 +279,7 @@ Additonal options may be specified with using `options`.

```yaml
with-sshfs-options:
box: centos8
box: centos9-stream
sshfs:
host_path: '/some/host/path'
guest_path: '/some/guest/path'
Expand All @@ -290,7 +290,7 @@ Example with an additional disk (libvirt volume) presented as /dev/vdb in the vm

```yaml
static:
box: centos8
box: centos9-stream
hostname: mystatic.box.com
add_disks:
- size: 100GiB
Expand All @@ -306,7 +306,7 @@ Then create your box:

```yaml
with-nfs:
box: centos8
box: centos9-stream
nfs:
host_path: '/some/host/path'
guest_path: '/some/guest/path'
Expand Down Expand Up @@ -347,7 +347,7 @@ Ansible roles may also be installed directly using the [`ansible-galaxy` command

```yaml
ansible:
box: centos8-stream-katello-nightly
box: centos9-stream-katello-nightly
ansible:
playbook:
- 'user_playbooks/vim.yml'
Expand Down
28 changes: 14 additions & 14 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ A Katello development environment can be deployed on CentOS 7. Ensure that you h
For example, if I wanted my upstream remotes to be origin and to install the remote execution and discovery plugins:

```yaml
centos8-katello-devel:
box: centos8-stream
centos9-katello-devel:
box: centos9-stream
ansible:
playbook: 'playbooks/katello_devel.yml'
group: 'devel'
Expand All @@ -52,13 +52,13 @@ centos8-katello-devel:
Lastly, spin up the box:

```
vagrant up centos8-katello-devel
vagrant up centos9-katello-devel
```

The box can now be accessed via ssh and the Rails server started directly (this assumes you are connecting as the default `vagrant` user):

```sh
vagrant ssh centos8-katello-devel
vagrant ssh centos9-katello-devel
cd foreman
bundle exec foreman start
```
Expand All @@ -67,9 +67,9 @@ bundle exec foreman start

When spinning up a Katello development environment locally, it can take a while to install and isn't always guaranteed to finish successfully. A stable Katello development environment was created to ensure an environment is always available to developers.

The Katello development stable box is named `centos8-katello-devel-stable`. Please see the [documentation on stable boxes](./stable_boxes.md) for more information on how to use this box.
The Katello development stable box is named `centos9-katello-devel-stable`. Please see the [documentation on stable boxes](./stable_boxes.md) for more information on how to use this box.

After spinning up `centos8-katello-devel-stable`, it's a good idea to pull the latest git branches and update gems and npm packages after spinning up a stable box. If a stable box image hasn't been published in a while, these can be out-of-date.
After spinning up `centos9-katello-devel-stable`, it's a good idea to pull the latest git branches and update gems and npm packages after spinning up a stable box. If a stable box image hasn't been published in a while, these can be out-of-date.

At this moment, you will have to manually configure any personal customizations such as github remotes.

Expand All @@ -80,12 +80,12 @@ Our backend requires a rails server to be running. We also use a webpack server
The files that webpack handles are located in `webpack/` directory found in Foreman, Katello,
and plugin root directories. If you are editing any files in `webpack/` and want to have your changes refresh automatically, you will need a webpack server running.

Because we are using a webpack server in conjunction with a rails server, there are different ways of starting a server depending on your needs and preferences. The following are instructions for starting the server using a base `centos8-katello-devel` box as a starting point.
Because we are using a webpack server in conjunction with a rails server, there are different ways of starting a server depending on your needs and preferences. The following are instructions for starting the server using a base `centos9-katello-devel` box as a starting point.

#### Run a rails and webpack server together using `foreman start`
- Run `bundle exec foreman start` in `~/foreman`
- Navigate to `https://centos8-katello-devel.<hostname>.example.com/` where `<hostname>` is the shortname of your hypervisor (machine your VM is running on) and accept the self-signed certs.
- Accept the self-signed certs on port 3808 at `https://centos8-katello-devel.<hostname>.example.com:3808`.
- Navigate to `https://centos9-katello-devel.<hostname>.example.com/` where `<hostname>` is the shortname of your hypervisor (machine your VM is running on) and accept the self-signed certs.
- Accept the self-signed certs on port 3808 at `https://centos9-katello-devel.<hostname>.example.com:3808`.
- Everything should be set for you to run `bundle exec foreman start` to start your dev server as needed.

NOTE: The `foreman` in `foreman start` is actually [this gem](https://github.com/ddollar/foreman) and not our `foreman`. It
Expand All @@ -108,12 +108,12 @@ in your boxes.yaml entry to configure this on box creation.

#### Custom files from git repo

A git repo's contents can be copied to the target user's home directory when spinning up a `centos8-katello-devel` or `centos8-katello-devel-stable` box. This can be done by specifying the `customize_home_git_repo` ansible variable. For example:
A git repo's contents can be copied to the target user's home directory when spinning up a `centos9-katello-devel` or `centos9-katello-devel-stable` box. This can be done by specifying the `customize_home_git_repo` ansible variable. For example:

```
centos8-katello-devel-stable:
centos9-katello-devel-stable:
box_name: katello/katello-devel
hostname: centos8-katello-devel-stable.example.com
hostname: centos9-katello-devel-stable.example.com
ansible:
playbook: 'playbooks/setup_user_devel_environment.yml'
variables:
Expand All @@ -132,7 +132,7 @@ mygitrepo

#### Custom local files

You can have files automatically copied over to the target user's home directory when spinning up a `centos8-katello-devel` or `centos8-katello-devel-stable` box. Here are the steps to specify custom files to be copied over:
You can have files automatically copied over to the target user's home directory when spinning up a `centos9-katello-devel` or `centos9-katello-devel-stable` box. Here are the steps to specify custom files to be copied over:

1. Create the directory `user_devel_env_files/` in Forklift's root directory.
2. Add any files you want to be copied over to your development box to `user_devel_env_files/`
Expand Down Expand Up @@ -304,7 +304,7 @@ katello-client:
playbook: 'playbooks/katello_client.yml'
group: 'client'
variables:
katello_client_server: 'centos8-katello-devel'
katello_client_server: 'centos9-katello-devel'
katello_client_organization: 'Default_Organization'
katello_client_environment: 'Library'
katello_client_username: 'admin'
Expand Down
20 changes: 10 additions & 10 deletions docs/stable_boxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This section discusses the usage and creation of stable environments.

## What is a stable box?

A stable box is a box that uses a published vagrant image of a successfully installed environment. These boxes usually have names that end with `-stable`, for example `centos8-katello-devel-stable`.
A stable box is a box that uses a published vagrant image of a successfully installed environment. These boxes usually have names that end with `-stable`, for example `centos9-katello-devel-stable`.

The boxes are guaranteed to spin up successfully because the installation steps do not happen locally. The boxes are created to make sure an environment is always available even if recent changes are preventing a box from spinning up.

Expand All @@ -18,7 +18,7 @@ The boxes are guaranteed to spin up successfully because the installation steps
To first time you spin up a stable box, you can perform the usual steps:

1. Copy `vagrant/boxes.d/99-local.yaml.example` to `vagrant/boxes.d/99-local.yaml`. If you already have a `99-local.yaml`, you can copy the entries in `99-local.yaml.example` to your `99-local.yaml`.
2. `vagrant up centos8-katello-devel-stable` to spin up the box (change the box name to the one you want to spin up)
2. `vagrant up centos9-katello-devel-stable` to spin up the box (change the box name to the one you want to spin up)

The latest stable box image will be downloaded from Vagrant cloud and used for the environment.

Expand All @@ -28,10 +28,10 @@ The difference between a stable box and the other boxes is when you want to spin

Without updating the box image, Vagrant will use the latest image downloaded locally instead of the latest image published to Vagrant cloud. This workflow is useful when you want an updated "fresh" environment with the latest backend systems, newer deployment changes, and updated packages. You can run the following to destroy your existing box, upgrade the box image to the latest one available, and spin up a new box.

For example with `centos8-katello-devel-stable`:
1. `vagrant destroy centos8-katello-devel-stable`
2. `vagrant box update centos8-katello-devel-stable`
3. `vagrant up centos8-katello-devel-stable`
For example with `centos9-katello-devel-stable`:
1. `vagrant destroy centos9-katello-devel-stable`
2. `vagrant box update centos9-katello-devel-stable`
3. `vagrant up centos9-katello-devel-stable`


### Managing multiple boxes
Expand Down Expand Up @@ -75,16 +75,16 @@ Packer will create an image by bootstrapping an operating system from a kickstar

### Example publishing workflow

For example, here is the workflow for `centos8-katello-devel-stable`:
For example, here is the workflow for `centos9-katello-devel-stable`:

1. A cron job or scheduled automation builds the box image with Packer using the `packer/centos8-katello-devel-stable.json` template.
1. A cron job or scheduled automation builds the box image with Packer using the `packer/centos9-katello-devel-stable.json` template.
2. This bootstraps CentOS 7 from an ISO and kickstart file and runs our katello devel environment playbook, creating an image.
3. This image is published to [Vagrant cloud](https://app.vagrantup.com/katello/boxes/katello-devel) using the date as a version to ensure it's the latest version. The image is only published if the katello development environment playbook has successfully ran.

Then locally:

1. A forklift user uses the box definition with `katello/katello-devel` as the base image, most likely the copied `centos8-katello-devel-stable` box definition.
2. On `vagrant up centos8-katello-devel-stable`, the most recent box image is downloaded from Vagrant clould and the box is created.
1. A forklift user uses the box definition with `katello/katello-devel` as the base image, most likely the copied `centos9-katello-devel-stable` box definition.
2. On `vagrant up centos9-katello-devel-stable`, the most recent box image is downloaded from Vagrant clould and the box is created.

### Key differences

Expand Down
6 changes: 0 additions & 6 deletions pipelines/katello_devel/01-boxes.yml

This file was deleted.

10 changes: 0 additions & 10 deletions pipelines/katello_devel/02-install.yml

This file was deleted.

8 changes: 0 additions & 8 deletions pipelines/katello_devel/03-tests.yml

This file was deleted.

3 changes: 0 additions & 3 deletions pipelines/katello_devel_pipeline.yml

This file was deleted.

4 changes: 0 additions & 4 deletions pipelines/katello_devel_pulp_integration_pipeline.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
pipeline_type: foreman
pipeline_os: centos8-stream
pipeline_os: centos9-stream
pipeline_version: nightly
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
pipeline_type: katello
pipeline_os: centos8-stream
pipeline_os: centos9-stream
pipeline_version: nightly
9 changes: 0 additions & 9 deletions pipelines/vars/katello_devel.yml

This file was deleted.

Loading
Loading