https://github.com/thatdevopsguy/cloudlamp
A modern Cloud solution for a LAMP stack, on Kubernetes
https://github.com/thatdevopsguy/cloudlamp
gcp gke kubernetes lamp terraform
Last synced: 5 months ago
JSON representation
A modern Cloud solution for a LAMP stack, on Kubernetes
- Host: GitHub
- URL: https://github.com/thatdevopsguy/cloudlamp
- Owner: ThatDevopsGuy
- Created: 2018-08-24T18:38:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-24T18:41:14.000Z (over 7 years ago)
- Last Synced: 2025-04-12T12:18:14.801Z (8 months ago)
- Topics: gcp, gke, kubernetes, lamp, terraform
- Language: HCL
- Homepage: https://www.cloudlamp.org/
- Size: 13.7 KB
- Stars: 5
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloud LAMP

This project aims to provide a modern cloud-based implementation of the [LAMP](https://en.wikipedia.org/wiki/LAMP) stack (Linux, Apache, MySQL and PHP). In particular, it implements the following improvements over a traditional monolithic LAMP deployment:
- Containerize the frontend and app layers in order to leverage consistent environments via immutable infrastructure.
- Leverage a managed cloud-based container orchestration service in order to eliminate operations overhead and provide seamless elastic, on-demand scalability.
- Leverage managed and distributed cloud database and storage backends, in order to eliminate operations overhead, increase resilience and availablity, and provide elastic, on-demand scalabliity.
- Fully automate the infrastructure deployment leveraging Infrastructure-as-Code technology.
## Components
Following on the design principles/goals stated above, below are the implementation details for each components in each solution
### Common
| Component | Implementation detail | Current version |
| ------ | ------ | ------ |
| Infrastructure deployment | Terraform | GCP, Kubernetes providers
| Container orchestration | Google Kubernetes Engine | v1.8.8
| Database backend | Google Cloud SQL | MySQL 5.6
| Storage backend (NFS option) | NFS | NFS on GCE VM
### Drupal
| Component | Implementation detail | Current version |
| ------ | ------ | ------ |
| Frontend + App | Drupal docker container | Bitnami v8.3.7r0
### Wordpress
| Component | Implementation detail | Current version |
| ------ | ------ | ------ |
| Frontend + App | Wordpress docker container | Wordpress v4.9.7
## Usage
### Pre-requisites
#### tl;dr
If you've got `gcloud` working, and a few variables set, you should be golden.
#### Create a GCP project and enable billing
We recommended that you create a separate GCP project for this deployment. It is possible to use an existing project but that may cause unknown issues due to unexpected existing conditions.
You can create a new project from the Google Cloud console following [these instructions](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
You can enable billing on your project in the Google Cloud console following [these instructions](https://cloud.google.com/billing/docs/how-to/modify-project).
#### Clone the repo, configure and deploy
Clone the deployment:
```sh
git clone http://gitlab.com/cloudlamp/cloudlamp
```
Change directory to the desired version, for example:
```sh
cd cloudlamp/wordpress
```
Deploy!
```sh
./preflight.sh
terraform apply
```
##### Access Wordpress
Once deployment is completed (usually after a few minutes), deployment results similar to these are displayed:
```sh
lb_ip =
```
The service is available at the "lb_ip" in the output above. Alternatively, you can check this IP in the "Services" tab of Kubernetes Enginer in the Google Cloud Console.
## Contributing
PRs and issue reports are very welcome!