Get ready with Walrus-From DevOps and developers' perspectives
Walrus, a brand new application deployment management platform, has finally been released officially. Walrus well adopts the concept of platform engineering, and it provides a user-friendly and consistent application management and deployment experience for the development as well as for operations teams, by reducing the complexity of infrastructure operations. Walrus allows DevOps engineers focus more on the infrastructure and developers can deploy and manage applications without needing extensive knowledge of infrastructure.
In this article, we will elaborate on how to build a Java Web service from source code and deploy it to Kubernetes with Walrus from the perspectives of a DevOps engineer and a developer.
From DevOps Perspective
Wei is a DevOps engineer at Alpha Company, and he now needs to set up a self-service platform for the development team, who may not be familiar with containers and Kubernetes.
He performs the following preparations:
1. Prepare a Linux server with at least 4 CPUs, 8GB of memory, and at least 50GB of free disk space.
2. Install Docker following the instructions in the Docker official documentation (https://docs.docker.com/).
3. Open ports 80 and 443 on the server.
4. Apply for the trial version of the product image from the Seal official website (https://seal.io/trial).
5. Install a Kubernetes cluster and obtain the Kubeconfig file.
Deployment
Execute the following command to start the Seal service:
XML |
Access
Access Seal's UI through https://<server-address>.
Upon the first login, follow the UI instructions to run the following command on the server to obtain the initial admin password:
XML |
Log in to Seal with the username "admin" and the initial admin password, and follow the UI instructions to set a new password and the Seal access address.
Configure Image Repository Authentication Key
Configure a test account for the image repository for developers' use:
1. Go to the "Operations Center" -> "Global Keys" menu, click the "New Key" button.
2. Fill in REGISTRY_USERNAME in the "Name" field and the image repository authentication username in the "Content" field, then click "Save."
3. Click the "New Key" button again.
4. Fill in REGISTRY_PASSWORD in the "Name" field and the image repository authentication password in the "Content" field, then click "Save."
Configure Kubernetes and Environment
Add the Kubernetes cluster as the deployment target for the application:
1. Go to the "Operations Center" -> "Connectors" menu, click the "New Connector" button.
2. Enter test-k8s in the "Name" field and paste the prepared cluster Kubeconfig file into the Kubeconfig field, then click "Save."
3. Go to the "Operations Center" -> "Environments" menu, click the "New Environment" button.
4. Enter development in the "Name" field.
5. Click the "Add Connector" button, select the test-k8s connector, and click "Save."
Note: Connectors are abstract objects that integrate with various infrastructure and services, such as Kubernetes, public/private clouds, virtual machines, version control systems, and more. Environments are the deployment targets for applications, and they can be associated with multiple connectors. |
Now Wei has completed the infrastructure setup! He can integrate various infrastructures and add application modules with DevOps best practices for the development team to use in the Seal platform. For the task mentioned here could be accomplished with Seal built-in modules.
From Developer's Perspective
Yan is a developer at Alpha Company, and he has no sufficient knowledge on Kubernetes. He would like to quickly set up a development test environment (self-service) without submitting tickets to the DevOps team.
Find project code repository here: https://github.com/seal-demo/spring-boot-docker-sample
Creating the Application
Yan logs into the Seal platform and performs the following steps:
1. Go to the "Application Management" -> "Applications" menu, click the "New Application" button.
2. Enter myapp in the "Name" field, click the "+" button in the module configuration section.
3. Enter s2i in the module name field, choose "build-container-image" from the module list, and enter the Git URL https://github.com/seal-demo/spring-boot-docker-sample
4. Click the "Build" tab, enter the image name registry.alpha.org/myproject/myimage:latest (Note: This is the repository address for Yan's Alpha Company; replace it with your own repository address).
5. Check "Registry Authentication," and enter ${secret.REGISTRY_USERNAME} in the "Username" field and ${secret.REGISTRY_PASSWORD} in the "Password" field. Seal UI will guide you to fill in the references to the configured keys. Click "OK" to save the configuration for the image building module.
6. Click the "+" button in the "Module Configuration" section again.
7. Enter web in the module name field, confirm webservice from the module list, and enter ${module.s2i.image} in the "Image Name" field. Seal's UI will guide you to fill in the references to other module outputs.
8. Modify Ports to 8888 (this is the port Yan's code listens on). Click "OK" to save the configuration for the web service module.
9. Click the "Save" button to save the application configuration.
Deploying Application
Now Yan can deploy the test environment on Seal with a single click:
1. Go to the details page of the myapp application.
2. Click the "+" button next to Application Information to add an instance.
3. Enter dev1 in the Name field and select the development environment provided by Wei from DevOps team. Click "OK" to create the application instance.
4. Wait for the deployment to complete, and the application instance's access address will appear on the UI.
TADA!
Yan can now access his service test environment! He can share the application with other development and testing team members and create multiple application use cases.
原文链接:
https://mp.weixin.qq.com/s?__biz=MzkzMDM3ODY5MA==&mid=2247492177&idx=1&sn=4efb68de19ccb304f42f60d3b583a172&chksm=c27984fcf50e0dea5d9be670bea3e77522a0928cd30814e7d418ff027bdeb4fb7e1c5c77e86d&token=57790122&lang=zh_CN#rd