-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Architecture] Infrastructure Deployment API & Plugin development #23
Comments
Thank you for putting this together. I like the approach of decoupling the bootstrapping code from the provisioning. It is a good engineering pattern/practice. If understand correctly, the suggested architecture activating support for multiple bootstrapping technologies. I would like us to consider the following:
|
As of now there is no user base for this project so this is created in the mind of our current expectation where we all are trying out different tech stack (pulumi/terraform ..etc.) and as now on draft side I can see that for terraform as of now only for infra creation part where deployer make sense and provisioning can be used same as what is currently used by shell also.
I think as of now this this arch. doesn't specify any tech but more of like if you are thinking how it should look like then this is one of design to achieve it ( bash part is just sample purpose because as of now that works)
I am still not in favor of using multiple bootstrapping tech, for POC point of view it is good and can be experiment with but not for long term.
Same as point-3 but we already have a CI issue for discuss that part. Bottom line is, this issue is discussion point of how the project arch should be, if we decide to use @adrianriobo have different view point when using IaC since he want to maintain every resource with the tool even provisioning part. I will ask him to put a flow here for that so we all are in same page. |
@praveenkumar Let me just clarify one tiny thing. I am a user :-). My plans are to consume this project in the CI of my projects. The suggested architecture doesn't support the approach you have shared. It just made me more confused. |
@lmilbaum Please share your concern what doesn't work with this arch and if possible can you outline the issue with this arch or share what you think would be good for in your usecase. |
Here is how we are using it now - https://github.com/platform-engineering-org/elk/blob/main/provision/up.yml. Here is a short list of my user stories:
|
So here are my thoughts on this: My point of view is as pretty align with @lmilbaum my final goal with it would be to include it as a step on a pipeline acting as a black box which creates the cluster and then gives me back what I need to connect remotely with the cluster and also the assets required to add a final step to the pipeline to cleanup the cluster (destroy resources on the provider) ...actually we already have something like this, specially with the container holding the current state of openspotng. Besides this, my PoC is with Pulumi and I promote that option based on several points:
This is solved by using the container image otherwise it will always require to install certain tools. Also beyond this dependencies there are others like user permissions on target cloud providers (this could be another thread) So basically all these points are implemented on the PoC I did for pulumi ( + added the import operation #10 ) I uploaded #26 (do not freak out +2k files is b/c of vendor folder xD) just in case someone wants to check it but I have one missing thing with the import to be fully functional, (create and destroy are full functional) Here is also a small diagram on all of this (related to cmd api #21): |
I do really like that Pulumi! Which Programming language are you using for the POC? |
it is go |
The aim of this issue is to describe the redesign in the CRC-Cloud architecture drafted in the PR #16 in order to decouple the Infrastructure provisioning from the OpenShift initialization and setup.
AS-IS
Originally the script has been developed to deploy the OpenShift instances on AWS, so everything has been packed in a single script that did the job. Since the project started to gain interest from other folks has been started a discussion regarding the support of other cloud infrastructures and provisioning technologies.
Assumptions
Benefits
Enhancements to the current implementation
Design
The design is vaguely inspired to Inversion of Control design pattern widely adopted in MVC frameworks where the program engine, in our case the
crc-cloud.sh
script, will automatically load the plugin code expecting that has been implemented respecting the API interface and calling the interface methods from the main program flow independently from the plugin logic from which it is fully decoupled. Considering that bash scripting is not an Object Oriented programming language, the compliance enforcement of the plugins to the API cannot be made at compile time, but will be done at runtime from purposely made methods defined in the API.API
api_load_deployer ()
Loads the selected Infrastructure Deployer Plugin. Before loading it makes several integrity checks on the plugin script:
main.sh
?main.sh
implement all the interface methods?deployer_load_dependencies()
deployer_usage()
deployer_get_eip()
deployer_get_iip()
deployer_create()
deployer_create()
deployer_teardown()
_<plugin_name>_
?main.sh
start with_<plugin_name>_
?api_wait_instance_readiness ()
Checks if the created VM is ready to receive an ssh connection and starts the OpenShift instance setup
Infrastructure Deployer API
deployer_load_dependencies ()
In this method should be done all the the plugin dependency loading, this guarantees that the
PLUGIN_ROOT_FOLDER
has been correctly valorized and that the dependency loading is made correctly to not break the application flow.deployer_usage()
Show the plugin description and usage, and presents the plugin specific arguments (if needed)
deployer_get_eip()
Returns the public IP address of the VM created by the plugin.
deployer_get_iip()
Returns the internal IP address of the VM created by the plugin.
deployer_create ()
This is the entry point for the infrastructure creation
deployer_teardown()
This is the entry point for the infrastructure teardown
The text was updated successfully, but these errors were encountered: