|
| 1 | +# Microservices Suite CLI |
| 2 | + |
| 3 | +## Kubernetes Orchestration and Application Scaffolding |
| 4 | + |
| 5 | +The **suiteCLI** tool streamlines the development workflow by automatically generating Kubernetes configurations for new applications. With the `suite generate app` command, developers can scaffold microservices and their required configurations effortlessly, accelerating setup and deployment in Kubernetes environments. |
| 6 | + |
| 7 | +### Overview |
| 8 | + |
| 9 | +The `suite generate app` command creates essential configurations in a structured, scalable way. It injects all necessary components within the folder structure, making it easier to manage configurations across different microservices. The CLI follows a modular approach, organizing Kubernetes and service files to support the entire development lifecycle. |
| 10 | + |
| 11 | +### Folder Structure |
| 12 | + |
| 13 | +After running `suite generate app`, your project will be structured as follows: |
| 14 | +```sequence |
| 15 | +k8s |
| 16 | +├── README.md |
| 17 | +├── broker |
| 18 | +│ ├── clusterIp.yaml |
| 19 | +│ ├── deployment.yaml |
| 20 | +│ ├── loadBalancer.yaml |
| 21 | +│ └── nodePort.yaml |
| 22 | +├── ingress |
| 23 | +│ └── ingress.yaml |
| 24 | +└── ns |
| 25 | + └── default |
| 26 | + └── <your_app> |
| 27 | + ├── combo.yaml |
| 28 | + └── <app_service> |
| 29 | + ├── configMap.yaml |
| 30 | + ├── db |
| 31 | + │ ├── clusterIp.yaml |
| 32 | + │ ├── deployment.yaml |
| 33 | + │ ├── loadBalancer.yaml |
| 34 | + │ └── nodePort.yaml |
| 35 | + ├── secret.yaml |
| 36 | + └── server |
| 37 | + ├── clusterIp.yaml |
| 38 | + ├── deployment.yaml |
| 39 | + ├── loadBalancer.yaml |
| 40 | + └── nodePort.yaml |
| 41 | +
|
| 42 | +``` |
| 43 | + |
| 44 | + |
| 45 | +### Directory and File Descriptions |
| 46 | + |
| 47 | +- **`k8s/`**: Contains all Kubernetes configurations for deploying your application. |
| 48 | + |
| 49 | + - **`broker/`**: Houses service configurations, allowing various access methods (ClusterIP, LoadBalancer, NodePort) for internal and external communication. |
| 50 | + |
| 51 | + - **`ingress/`**: Includes Ingress configurations for routing external traffic to your services. |
| 52 | + |
| 53 | + - **`ns/default/<your_app>/`**: Contains namespace-specific configurations for your application. |
| 54 | + |
| 55 | + - **`combo.yaml`**: Central configuration that ties together all components for deployment. |
| 56 | + |
| 57 | + - **`<app_service>/`**: Directory for a specific application service, including: |
| 58 | + |
| 59 | + - **`configMap.yaml`**: Configuration data for the application service. |
| 60 | + |
| 61 | + - **`db/`**: Contains database service configurations with various access methods. |
| 62 | + |
| 63 | + - **`clusterIp.yaml`**: Configuration for accessing the database via ClusterIP. |
| 64 | + |
| 65 | + - **`deployment.yaml`**: Deployment configuration for the database service. |
| 66 | + |
| 67 | + - **`loadBalancer.yaml`**: Configuration for exposing the database service via LoadBalancer. |
| 68 | + |
| 69 | + - **`nodePort.yaml`**: Configuration for exposing the database service via NodePort. |
| 70 | + |
| 71 | + - **`secret.yaml`**: Contains sensitive data (e.g., passwords) required by the application service. |
| 72 | + |
| 73 | + - **`server/`**: Contains server-related configurations. |
| 74 | + |
| 75 | + - **`clusterIp.yaml`**: Configuration for accessing the server via ClusterIP. |
| 76 | + |
| 77 | + - **`deployment.yaml`**: Deployment configuration for the server service. |
| 78 | + |
| 79 | + - **`loadBalancer.yaml`**: Configuration for exposing the server service via LoadBalancer. |
| 80 | + |
| 81 | + - **`nodePort.yaml`**: Configuration for exposing the server service via NodePort. |
| 82 | + |
| 83 | +### Usage |
| 84 | + |
| 85 | +To scaffold a new application with the necessary Kubernetes configurations, run: |
| 86 | + |
| 87 | +```bash |
| 88 | +suiteCLI generate app --name <your_app> |
0 commit comments