Skip to content

Commit

Permalink
GitBook: [main] 17 pages and 108 assets modified
Browse files Browse the repository at this point in the history
  • Loading branch information
AlannaBurke authored and gitbook-bot committed Jun 29, 2021
1 parent ea0583e commit 9759abf
Show file tree
Hide file tree
Showing 81 changed files with 343 additions and 173 deletions.
File renamed without changes
File renamed without changes
Binary file added docs/.gitbook/assets/3 (2) (2) (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added docs/.gitbook/assets/4 (2) (2) (3).gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added docs/.gitbook/assets/5 (2) (2) (3).gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added docs/.gitbook/assets/6 (2) (2) (3).gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/.gitbook/assets/8 (2) (2) (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/container_overview (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/lagoon-logo (1).png
Binary file added docs/.gitbook/assets/lagoon-logo (2) (2) (2).png
Binary file modified docs/.gitbook/assets/lagoon-logo (2).png
Binary file added docs/.gitbook/assets/scanning_image_1 (3).png
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lagoon

![](.gitbook/assets/lagoon-logo.png)
![](.gitbook/assets/lagoon-logo%20%282%29.png)

## Lagoon - Docker Build and Deploy System for OpenShift & Kubernetes

Expand Down
4 changes: 2 additions & 2 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
* [GraphQL](using-lagoon-advanced/graphql.md)
* [Private Repositories](using-lagoon-advanced/private-repositories.md)
* [SimpleSAML](using-lagoon-advanced/simplesaml.md)
* [Project Default Users and SSH keys](using-lagoon-advanced/project-default-users-keys.md)
* [Project Default Users and SSH Keys](using-lagoon-advanced/project-default-users-keys.md)
* [Node.js Graceful Shutdown](using-lagoon-advanced/nodejs.md)
* [Setting up Xdebug with Lagoon](using-lagoon-advanced/setting-up-xdebug-with-lagoon.md)
* [Environment Idling](using-lagoon-advanced/environment-idling.md)
* [Installing Lagoon Into Existing Kubernetes Cluster](using-lagoon-advanced/installing-lagoon-into-existing-kubernetes-cluster.md)

## Drupal

Expand Down Expand Up @@ -92,7 +93,6 @@
## Contributing to Lagoon

* [Developing Lagoon](contributing-to-lagoon/developing-lagoon.md)
* [Install Local Kubernetes Cluster for Lagoon](contributing-to-lagoon/install-local-kubernetes-cluster-for-lagoon.md)
* [Code of Conduct](contributing-to-lagoon/code-of-conduct.md)
* [Contributing](contributing-to-lagoon/contributing.md)
* [Tests](contributing-to-lagoon/tests.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/administering-lagoon/graphql-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Under "GraphQL Endpoint", enter the API endpoint URL with `/graphql` on the end.

Press ESC to close the HTTP header overlay and now we are ready to send the first GraphQL request!

![Editing HTTP Headers in GraphiQL.](../.gitbook/assets/graphiql-2020-01-29-18-05-54%20%285%29%20%281%29.png)
![Editing HTTP Headers in GraphiQL.](../.gitbook/assets/graphiql-2020-01-29-18-05-54%20%285%29%20%285%29%20%282%29.png)

Enter this in the left panel

Expand Down
6 changes: 3 additions & 3 deletions docs/administering-lagoon/using_harbor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ If you are hosting a site with amazee.io, we do not allow customer access to the

Once logged in, the first screen is a list of all repositories your user has access to. Each "repository" in Harbor correlates to a project in Lagoon.

![Harbor Projects Overview](../../.gitbook/assets/projects_overview%20%282%29%20%281%29.png)
![Harbor Projects Overview](../../.gitbook/assets/projects_overview%20%282%29%20%282%29%20%281%29.png)

Within each Harbor repository, you'll see a list of container images from all environments with a single Lagoon project.

![Harbor Repositories Overview](../../.gitbook/assets/repositories_overview%20%282%29%20%282%29.png)
![Harbor Repositories Overview](../../.gitbook/assets/repositories_overview%20%282%29%20%282%29%20%282%29.png)

From here, you can drill down into an individual container in order to see its details, including an overview of its security scan results.

![Harbor Container Overview](../../.gitbook/assets/container_overview%20%281%29.png)
![Harbor Container Overview](../../.gitbook/assets/container_overview%20%282%29.png)

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Harbor comes with a built-in security scanning solution provided by the Trivy se

An example of a security scan in Harbor, showing applicable vulnerabilities for a scanned container:

![Harbor Security Scanning Example Image](../../.gitbook/assets/scanning_image_1%20%282%29.png)
![Harbor Security Scanning Example Image](../../.gitbook/assets/scanning_image_1%20%283%29.png)

This file was deleted.

12 changes: 6 additions & 6 deletions docs/drupal/first-deployment-of-drupal.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ This will trigger a push, and the Git hosting will inform Lagoon about this push

If all is correct, you will see a notification in your configured chat system \(this is configured by your friendly Lagoon administrator\):

![Slack notification of a deployment starting.](../.gitbook/assets/first_deployment_slack_start%20%282%29.jpg)
![Slack notification of a deployment starting.](../.gitbook/assets/first_deployment_slack_start%20%282%29%20%282%29.jpg)

This tells you that Lagoon has just started to deploy your code. Depending on the size of the codebase and amount of containers, this will take a couple of seconds. Just relax. If you'd like to know what's happening now, check out the [Build and Deploy Process of Lagoon](../using-lagoon-the-basics/build-and-deploy-process.md).

You can also check your Lagoon UI to see the progress of any deployment \(your Lagoon administrator has the info\).

## 4. A fail
## 3. A fail

Depending on the post-rollout tasks defined in `.lagoon.yml` , you might have run some tasks like `drush updb` or `drush cr`. These Drush tasks depend on a database existing within the environment, which obviously does not exist yet. Let's fix that! Keep reading.

## 5. Synchronize local database to the remote Lagoon environment
## 4. Synchronize local database to the remote Lagoon environment

With full Drush site alias support in Lagoon, you can synchronize a local database with the remote Lagoon environment.

Expand Down Expand Up @@ -92,13 +92,13 @@ git push

This time all should be green:

![Deployment Success!](../.gitbook/assets/first_deployment_slack_success%20%282%29%20%282%29.jpg)
![Deployment Success!](../.gitbook/assets/first_deployment_slack_success%20%282%29%20%282%29%20%282%29.jpg)

Click on the links in the notification, and you should see your Drupal site loaded in all its beauty! It will probably not have images yet, which we will handle in [Step 6](first-deployment-of-drupal.md#6-synchronize-local-files-to-the-remote-lagoon-environment).

If it is still failing, check the logs link for more information.

## 6. Synchronize local files to the remote Lagoon environment
## 5. Synchronize local files to the remote Lagoon environment

You probably guessed it: we can do it with Drush:

Expand All @@ -124,7 +124,7 @@ Do you really want to continue? (y/n):

The reason for that is that the Drupal cannot resolve the path of the files directory. This most probably has to do that the Drupal is not fully configured or has a missing database. For a workaround you can use `drush rsync @self:sites/default/files @develop:sites/default/files`, but we suggest that you actually check your local and remote Drupal \(you can test with `drush status` to see if the files directory is correctly configured\).

## 7. It's done!
## 6. It's done!

As soon as Lagoon is done building and deploying it will send a second notification to the chat system, like so:

Expand Down
10 changes: 5 additions & 5 deletions docs/drupal/subfolders.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It would be possible to run both Drupals in a single Git repository and deploy i

## Modifications of root application

The root application \(in this example, the Drupal site for `www.example.com`\), needs a couple of Nginx configs that will configure Nginx to be a reverse proxy to the subfolder applications:
The root application \(in this example, the Drupal site for `www.example.com`\), needs a couple of Nginx configs that will configure NGINX to be a reverse proxy to the subfolder applications:

### `location_prepend.conf`

Expand Down Expand Up @@ -58,9 +58,9 @@ Replace the following strings:
* `nginx` with the service that you want to point too in the subfolder project.
* `lagoonproject` with the Lagoon projectname of the subfolder project.

### Nginx Dockerfile
### NGINX Dockerfile

Add the following to your Nginx Dockerfile \(`nginx.dockerfile` or `Dockerfile.nginx`\):
Add the following to your NGINX Dockerfile \(`nginx.dockerfile` or `Dockerfile.nginx`\):

{% tabs %}
{% tab title="nginx.dockerfile" %}
Expand Down Expand Up @@ -140,9 +140,9 @@ Replace `/subfolder` with the name of the subfolder you want to use. For example

### Nginx Dockerfile

We also need to modify the Nginx Dockerfile.
We also need to modify the NGINX Dockerfile.

Add the following to your Nginx Dockerfile \(`nginx.dockerfile` or `Dockerfile.nginx`\):
Add the following to your NGINX Dockerfile \(`nginx.dockerfile` or `Dockerfile.nginx`\):

{% tabs %}
{% tab title="nginx.dockerfile" %}
Expand Down
10 changes: 5 additions & 5 deletions docs/logging/kibana-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Below you'll find examples for two common log requests:
* You can add any of those fields to the window by hovering over them and clicking add on the left hand side \(\#6\).
* You can also further filter your results by using the search bar.

![How to get the total number of hits/requests to your site in Kibana.](../.gitbook/assets/kibana_example1%20%282%29.png)
![How to get the total number of hits/requests to your site in Kibana.](../.gitbook/assets/kibana_example1%20%282%29%20%282%29.png)

### Number of hits/requests from a specific IP address

Expand All @@ -41,14 +41,14 @@ We are going to start off with the same query as above, but we are going to add
* First, add the following fields: `client_ip` and `http_request`.
* This will show you a list of all IP addresses and the page they requested. Here is what we see for the Amazee.io page:

![All IP addresses and the page they requested.](../.gitbook/assets/kibana_example2%20%282%29%20%282%29.png)
![All IP addresses and the page they requested.](../.gitbook/assets/kibana_example2%20%282%29%20%282%29%20%282%29.png)

That looks good, but what if we wanted to just show requests from a specific IP address? You can filter for the address by adding it to your search criteria.

* We are going to add: `AND client_ip: "IP address"`.
* That will filter the results to just show you hits from that specific IP address, and the page they were requesting. Here is what it looks like for our Amazee.io website:

![Hits from a specific IP address.](../.gitbook/assets/kibana_example3%20%282%29%20%281%29.png)
![Hits from a specific IP address.](../.gitbook/assets/kibana_example3%20%282%29%20%282%29%20%281%29.png)

## Container Logs

Expand All @@ -66,7 +66,7 @@ Want to see the logs for a specific container \(php, nginx, etc\)? This section
* Let's add the message field and the level field to the view. You can do that by clicking on "Add" on the left hand side \(\#5\).
* You can change the time frame in the upper right hand corner of the screen \(\#6\), in the example below I'm looking at logs for the last 4 hours.

![](../.gitbook/assets/kibana_example4%20%282%29.png)
![](../.gitbook/assets/kibana_example4%20%282%29%20%282%29.png)

### Specific errors in logs

Expand All @@ -93,7 +93,7 @@ Make sure that you select an appropriate time frame for the data in the upper ri

Here is an example of a daily hits visualization chart:

![Daily hits visualization chart.](../.gitbook/assets/kibana_example5%20%282%29%20%281%29.png)
![Daily hits visualization chart.](../.gitbook/assets/kibana_example5%20%282%29%20%282%29%20%282%29.png)

Also note that you can save your visualizations \(and searches\)! That will make it even faster to access them in the future. And because each account has their own Kibana Tenant, no searches or visualizations are shared with another account.

Expand Down
12 changes: 6 additions & 6 deletions docs/using-lagoon-advanced/base-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ For any modules now added to the base image, we need to ensure that they’re en

Here we open `web/modules/contrib/lagoon/lagoon_bundle/lagoon_bundle.info.yml` and add `clamav:clamav` as a dependency:

![Adding ClamAV as a dependency of Lagoon Bundle.](../.gitbook/assets/3%20%282%29.png)
![Adding ClamAV as a dependency of Lagoon Bundle.](../.gitbook/assets/3%20%282%29%20%282%29.png)

Adding a dependency to this will ensure that whenever the Lagoon Bundle module is enabled on the derived image, its dependencies \(in this case, the just-added ClamAV module\) will also be enabled. This is enforced by a post-rollout script which enables `lagoon_bundle` on the derived images when they are rolled out.

Expand All @@ -192,15 +192,15 @@ This will depend on what you’re testing. In the case of adding the ClamAV modu

Here we check that the module is downloaded to `/app/web/modules/contrib`:

![Checking /app/web/modules/contrib to make sure ClamAV is downloaded. ](../.gitbook/assets/4%20%282%29%20%281%29.gif)
![Checking /app/web/modules/contrib to make sure ClamAV is downloaded. ](../.gitbook/assets/4%20%282%29%20%282%29%20%282%29.gif)

And then we check that when we enable the `lagoon_bundle` module, it enables `clamav` by running:

```bash
drush pm-enable lagoon_bundle -y
```

![Running \`drush pm-enable lagoon\_bundle -y\` and seeing that it also enables ClamAV](../.gitbook/assets/5%20%282%29%20%281%29.gif)
![Running \`drush pm-enable lagoon\_bundle -y\` and seeing that it also enables ClamAV](../.gitbook/assets/5%20%282%29%20%282%29%20%282%29.gif)

{% hint style="warning" %}
**Note:** You’ll see that there is a JWT error in the container above. You can safely ignore this in the demonstration above - but, for background, you will see this error when there is no Lagoon environment for the site you’re working on.
Expand Down Expand Up @@ -229,7 +229,7 @@ We check that we have committed \(but not pushed\) our changes, just as you woul
**Note:** The tags must be pushed explicitly in their own step!
{% endhint %}

![Demonstrating how to tag and push a base image.](../.gitbook/assets/6%20%282%29.gif)
![Demonstrating how to tag and push a base image.](../.gitbook/assets/6%20%282%29%20%282%29.gif)

#### How Git tags map to image tags

Expand Down Expand Up @@ -257,15 +257,15 @@ Images are tagged using the following rules, and images will be built for each o
3. Click the branch you would like to build.
4. Click “Build Now.”

![Showing how to build a base image in the Jenkins UI.](../.gitbook/assets/7%20%282%29%20%282%29.gif)
![Showing how to build a base image in the Jenkins UI.](../.gitbook/assets/7%20%282%29%20%282%29%20%282%29.gif)

This will kick off the build process which, if successful, will push up the new images to Harbor.

If the build is not successful, you can click into the build itself and read the logs to understand where it failed.

As shown in the screenshot below from Harbor, the image we’ve just built in Jenkins has been uploaded and tagged in Harbor, where it will now be scanned for any vulnerabilities. Since it was tagged as v0.0.9, an image with that tag is present, and because we built the **main** branch, the “latest” image has also been built. At this stage, the v0.0.9 and “latest” images are identical.

![Screenshot from Harbor showing uploaded and tagged images.](../.gitbook/assets/8%20%282%29%20%281%29.png)
![Screenshot from Harbor showing uploaded and tagged images.](../.gitbook/assets/8%20%282%29%20%282%29%20%281%29.png)

## Acknowledgement

Expand Down
Loading

0 comments on commit 9759abf

Please sign in to comment.