Disclosure of Invention
In order to solve the technical problems, the invention provides a containerized openstack data initialization method, which provides repeatable refreshing operation for deployment of openstack related applications in a Kubernetes cluster, reduces manpower waste and saves deployment time.
The technical scheme of the invention is as follows:
a method for initializing containerized opentack data,
mainly comprises the following steps:
1) A configuration parser to separate specific applications and configurations;
2) Distinguishing applications using annotations;
3) The deployment tool automatically refreshes the Values.
Further, the method comprises the steps of,
pre-preparation should be made prior to operation, including:
adding comments in the application chart;
adding configuration with a specified format by using values in the chart;
plans in the environment planning table are treated by name.
Wherein, add notes in the application chart, the content is as follows:
annotations:
openstack_associated: t
openstack_networklist: [networkA, networkB]
openstack_flavorlist: [flavorA, flavorB]
the value in the application chart adds the configuration in the prescribed format, the content is as follows:
network:
id: 12345
name: test
subnet: 123123
still further, the method comprises the steps of,
the method comprises the following specific steps:
1) And uploading the environment planning table and the application list to a file server.
2) The file server pushes the application to the application deployment tool container.
3) In the deployment process, judging whether to call an opentack to initialize an application container according to whether the annotation opentack_associated in the application chart is true;
if not true, deploying the application;
if true, the opentack initialization application container acquires specific configuration information from the configuration parser container according to the name transmitted by the deployment tool container;
if the configuration information exists, directly inquiring the configuration;
if the configuration information is not available, creating configuration and feeding back to the deployment tool container;
the deployment tool container flushes the values file of the application and deploys the application.
a) The use of a configuration parser allows for separation of specific applications and configurations.
b) The use of annotations makes it easy to differentiate applications
c) Automated refreshing of Values by deployment tools simplifies the configuration of openstack
The invention has the beneficial effects that
The workload of configuration of operation and maintenance personnel is reduced, the admission standard of the operation and maintenance personnel is reduced, and the environment configuration time is saved. So that the deployment is changed from deployment opentack to manual reconfiguration to deployment application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
1. Pre-preparation:
the append annotation in the application chart is exemplified as follows:
annotations:
openstack_associated: t
openstack_networklist: [networkA, networkB]
openstack_flavorlist: [flavorA, flavorB]
the configuration of adding a prescribed format to the values in the application chart is exemplified as follows:
network:
id: 12345
name: test
subnet: 123123
network etc. plans in an environment planning table are treated by name
2. The flow is as follows:
1) The operation and maintenance personnel upload the environment planning table and the application list to a designated file server
2) Pushing applications to application deployment tool container
3) In the deployment process, whether to call (openstack initialization application container) is judged according to whether the annotation openstack_associated in the application chart is true or not
4) The configuration of a specific network, mirror image and the like is acquired from the configuration parser container according to the deployment tool container incoming, and the configuration (if present, the configuration is directly queried) is created and fed back to the deployment tool container
5) Refreshing values file of application and deploying application
Keyword:
1. a container: kernel lightweight operating system layer virtualization technology
2. kubernetes: a distributed cluster management system in which a worker is run on each node to manage the life cycle of a container
3. git version control tool
4. Logical processor, which is responsible for processing database scripts
5. database client: integrating various versions of database clients into containers
The foregoing description is only illustrative of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.