Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver committed Sep 9, 2024
1 parent 5b9723e commit fea41a3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
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

0 comments on commit fea41a3

Please sign in to comment.