Skip to content

Commit

Permalink
feat: application details section added (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoysrt authored Jan 31, 2024
1 parent 0bc1970 commit 2553e9b
Show file tree
Hide file tree
Showing 31 changed files with 218 additions and 12 deletions.
18 changes: 18 additions & 0 deletions docs/dashboard/application_details/application_update_source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: update_source_code
title: Update Source Code
sidebar_position: 4
---

In **Update Source Code** section, you can update the source of the application. You can update the source of the application to deploy a new version of the application.

![Update Source Code](/assets/application-update-source.png)

### How to update source of the application ?
- Change the source info of the application.
- Click on **`Re-Generate Configuration`** button.
- Then you can update generated Dockerfile.
- You can modify the build args as well.
- Click on **`Apply Changes`** button to update the source of the application.

> 📌 Note: If you have deployed your application using git config, currently you can't switch to docker image deployment or something else. In future, we will try to support this feature.
27 changes: 27 additions & 0 deletions docs/dashboard/application_details/danger_zone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
id: danger_zone
title: Danger Zone
sidebar_position: 9
---

In **Danger Zone** section, you have some options which can lead to downtime of the application. So, be careful while using these options.

![Danger Zone](/assets/application-danger-zone.png)

### Restart Application

To restart the application, click on the **Restart Application** button. This action will restart all instances of the application.


### Rebuild Application

If you've updated your project's source code on GitHub/GitLab or in the Image Registry, tap on **Rebuild Application**. This will rebuild your application with the latest source code.

> Note: If your application is configured to run multiple instances in the **Deployment Configuration**, there won't be downtime. However, with only one instance, expect a brief downtime.

### Delete Application

To delete the application, tap on **Confirm & Delete Application**. This action deletes the application and all associated data.

Handle these options with care, as they can impact application availability. 🚨
15 changes: 15 additions & 0 deletions docs/dashboard/application_details/deployment_configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
id: deployment_configuration
title: Deployment Configuration
sidebar_position: 7
---

In **Deployment Configuration** section, you can *scale up* or *scale down* the application.

![Deployment Configuration](/assets/application-deployment-configuration.png)

**Deployment Modes -**
- **Replicated Mode** - In this mode, you can specify the number of instances you want to run for the application.
- **Global Mode** - In this mode, each server of swiftwave will run one instance of the application.

> 📌 Note: Currently you can't change the deployment strategy of the application. **Replicated** mode is suitable for most of the applications. If you don't know what to choose, then choose **Replicated** mode.
22 changes: 22 additions & 0 deletions docs/dashboard/application_details/deployments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: deployments
title: Deployments
sidebar_position: 1
---

In **Deployments** section, you can see all the deployments of the application. You can check the status of the deployment and time of deployment at a glance.

![Deployment List](/assets/deployment-list.png)

But, you want to see more details about the deployment, you can click on the **Deployment Card** to see more details about the deployment.

Once you click on the **Deployment Card**, you will see the **Deployment Details** page like this:

![Deployment Details](/assets/deployment-details.png)

Here, you can see complete details about the deployment. You can also check deployment logs to figure out what went wrong.

> 📌 While deployment is live,
- The *Deployment Logs* will be updated in realtime.
- **Request Cancellation** button will be available to cancel the deployment, if due to any reason docker build stuck, you can cancel the deployment.
![Deployment Cancel](/assets/cancel-deployment.png)
11 changes: 11 additions & 0 deletions docs/dashboard/application_details/environment_variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
id: environment_variables
title: Environment Variables
sidebar_position: 5
---

In **Environment Variables** section, you can see all the environment variables of the application. You can add new environment variables, edit existing environment variables, and also can delete environment variables.

![Environment Variables](/assets/application-environment-variables.png)

The UI is pretty simple and self-explanatory. After you change something, click on **`Apply Changes`** button to save the changes.
25 changes: 25 additions & 0 deletions docs/dashboard/application_details/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
id: application_details
title: 📋 Application Details
sidebar_position: 4
---

In **Application Details**, you can see all the details about the application. You can check the status of the application, last time when it was updated, and the number of instances running for that application.

<img src="/assets/application-details.png" alt="SwiftWave Dashboard" width="100%"/>

On the right side, you can see realtime information about the count of active instances of the application.

🏄‍♂️ Let's go through each section of the **Application Details** page.

| Section | Page Link |
|---------|-----------|
| Deployments | [***Click Here***](/docs/dashboard/application_details/deployments) |
| Runtime Logs | [***Click Here***](/docs/dashboard/application_details/runtime_logs) |
| Ingress Rules | [***Click Here***](/docs/dashboard/application_details/ingress_rules) |
| Update Source Code | [***Click Here***](/docs/dashboard/application_details/update_source_code) |
| Environment Variables | [***Click Here***](/docs/dashboard/application_details/environment_variables) |
| Persistent Volumes | [***Click Here***](/docs/dashboard/application_details/persistent_volumes) |
| Deployment Configuration | [***Click Here***](/docs/dashboard/application_details/deployment_configuration) |
| Webhook CI | [***Click Here***](/docs/dashboard/application_details/webhook_ci) |
| Danger Zone | [***Click Here***](/docs/dashboard/application_details/danger_zone) |
9 changes: 9 additions & 0 deletions docs/dashboard/application_details/ingress_rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: ingress_rules
title: Ingress Rules
sidebar_position: 3
---

In **Ingress Rules** section, you can find out all the associated ingress rules for the application.

![Ingress Rules](/assets/application-ingress-rules.png)
13 changes: 13 additions & 0 deletions docs/dashboard/application_details/persistent_volumes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
id: persistent_volumes
title: Persistent Volumes
sidebar_position: 6
---

In **Persistent Volumes** section, you can see all the persistent volumes of the application. You can add new persistent volumes, edit existing persistent volumes, and also can delete persistent volumes.

![Persistent Volumes](/assets/application-persistent-volume.png)

You can choose pre-registered persistent volume and provide a mount path. After you change something, click on **`Apply Changes`** button to save the changes.

> **Mount Path** - The path where the persistent volume will be mounted inside the container of the application.
9 changes: 9 additions & 0 deletions docs/dashboard/application_details/runtime_logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: runtime_logs
title: Runtime Logs
sidebar_position: 2
---

In **Runtime Logs** section, you can see all the logs of the application. The logs are updated in realtime, so you don't have to refresh the page to check the latest logs.

![Runtime Logs](/assets/runtime-logs.png)
53 changes: 53 additions & 0 deletions docs/dashboard/application_details/webhook_ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
id: webhook_ci
title: Webhook CI
sidebar_position: 8
---

You can manage the webhook CI of the application from the **Webhook CI** section.

This **Webhook** can be used to trigger re-deployment of the application when the source code of the application is updated.

![Webhook CI](/assets/application-webhook-ci.png)

**Regenerate Webhook Token** - You can regenerate the webhook URL by tapping on **Regenerate Webhook** button. If you have exposed the webhook URL to the public by mistake, then you can regenerate the webhook URL to make the old webhook URL invalid.

---

### 🚀 Setting Up Auto Deployment on GitHub

1. Open your GitHub repository
2. Click on **Settings** ⚙️
3. Go to **Webhooks** from the left menu
4. Press the **Add webhook** button 🤖
5. Copy and paste the webhook URL in the **Payload URL** field
6. Choose **Just the push event** from the options
7. Click **Add webhook** to save 🚀
8. Hooray! 🎉 Whenever you push changes, the webhook triggers, and your app auto-redeploys! 🔄

---

### 🚀 Setting Up Auto Deployment on GitLab

1. Open your GitLab repository
2. Click on **Settings** ⚙️
3. Navigate to **Webhooks** from the left menu
4. Hit the **Add New webhook** button 🤖
5. Copy-paste the webhook URL into the **URL** field
6. Check **Push events** from the **Triggers** section
7. Click **Add webhook** to save 🚀
8. Fantastic! 🎉 Push changes, trigger the webhook, and your app auto-redeploys! 🔄

---

### Auto Deployment on Docker Hub

> Note: Make sure you have a Docker Hub account, and you need administrative access to the project.
1. Open your Docker Hub account
2. Go to the specific repository 📦
3. Click on **Webhooks** 🌐
4. Add the webhook URL
5. Ensure you have administrative access to the project
6. Click on **Create** 🚀
7. Done! 🎉 Push changes, trigger the webhook, and your app auto-redeploys! 🔄
10 changes: 9 additions & 1 deletion docs/dashboard/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@
id: applications
title: 📦 Applications
sidebar_position: 3
---
---

In **Application List**, you can see all the applications that you have created. You can check the status of the application, last time when it was updated, and the number of instances running for that application.

<img src="/assets/application-list.png" alt="SwiftWave Dashboard" width="100%"/>

You can click on **`View Details`** button to see more details about the application.

Check out [**Application Details**](/docs/dashboard/application_details) to learn more about it.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: change-password
id: change_password
title: 🔒 Change Password
sidebar_position: 11
---
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
id: deploy-new-application
id: deploy_new_application
title: 🔨 Deploy New Application
sidebar_position: 1
---

# 🔨 Deploy New Application

### 📝 Pre-requisites
Deploying with SwiftWave is a breeze – just bring your application's source code, and SwiftWave handles everything else.

Expand Down
1 change: 0 additions & 1 deletion docs/dashboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ hide_table_of_contents: true
sidebar_position: 5
---

# 🖥️ SwiftWave Dashboard
<div style={{
display: 'flex',
justifyContent: 'center',
Expand Down
2 changes: 0 additions & 2 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ title: 🚀 Getting Started
sidebar_position: 4
---

# 🚀 Getting Started

Let's get started with SwiftWave!
Let's first install SwiftWave on your server. Because without SwiftWave, you can't deploy your applications. 😅

Expand Down
2 changes: 0 additions & 2 deletions docs/manifesto.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ title: 🌱 SwiftWave Manifesto
sidebar_position: 3
---

# 🌱 SwiftWave Manifesto

SwiftWave, our self-hosted PaaS marvel, is here to make deploying and managing your applications on any VPS a breeze! 🌐

**Our Goals:**
Expand Down
2 changes: 0 additions & 2 deletions docs/why_swiftwave.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ title: 🌊 Why SwiftWave ?
sidebar_position: 2
---

# 🌊 Why SwiftWave?

Hey there! 🚀 Ever wondered why there's yet another PaaS cloud orchestration tool in the sea of options? Let's dive into the story behind SwiftWave.

In a world of k8s, k3s, and various orchestrators designed for the big league, what about the small players? Not everyone needs a massive k8s cluster for a petite application. I mean, seriously, a k8s master node demands 2GB of RAM and 2 vCPUs just for starters! ([**Ref**](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)) That's a bit much, especially if you're just starting out and finding your feet.
Expand Down
5 changes: 5 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@
--ifm-background-color: #111827;
--ifm-navbar-background-color: #111827;
}


.markdown header h1 {
--ifm-h1-font-size: 2rem!important;
}
Binary file added static/assets/application-danger-zone.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 static/assets/application-details.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 static/assets/application-ingress-rules.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 static/assets/application-list.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 static/assets/application-persistent-volume.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 static/assets/application-update-source.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 static/assets/application-webhook-ci.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 static/assets/cancel-deployment.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 static/assets/deployment-details.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 static/assets/deployment-list.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 static/assets/runtime-logs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2553e9b

Please sign in to comment.