As part of the DevOps culture, and in particular the Ops processes, Stack Automation Engineers will always be interested in orchestrating the infrastructure and make it available for various environments, starting from Dev & Test, Benchmark, and/or Production or others.
Depending on your preferences, you could deploy a Chef Server in Oracle IaaS and orchestrate all your infrastructure ( the nodes ) from it, that being probably one of the most common setups, also my preferred one and to which I will make reference in this current article.
Alternatively, you could work directly from your workstation where you have installed Chef DK and orchestrate all your infrastructure in Oracle IaaS ( the various nodes ) through a Chef Server that you can deploy it anywhere:
or have your Nodes Chef orchestrating themselves together with opc-init from remote accessible URL(s) where you deployed the desired scripts (pre-bootstrap), you can read more about it here.
Follow this link, for a full tutorial on how to deploy Chef Server on Oracle Compute Cloud and how to knife a simple cookbook named "custom-ssh-banner".
Once you uploaded your cookbook on the chef server and knife it on a node, presuming your orchestrated node is named "chef-node1", once you will ssh into your "chef-node1" you should receive a similar notification as in the below:
This banner was brought to you by Chef using custom-ssh-banner. [opc@chef-node1 ~]$
Tip: to knife bootstrap your node with a public ip <Node_Public_IP> and a hostname chef-node1:
knife bootstrap <Node_Public_IP> --ssh-user opc --sudo --identity-file <SSH_private_key> --node-name chef-node1.compute-identity-domain.oraclecloud.internal --run-list 'recipe[your_recipe]'
- opc refers to the Oracle Public Cloud user, through which you can sudo to root on the machine if needed
- chef-node1.compute-identity_domain.oraclecloud.internal refers to the internal hostname as qualified in Oracle IaaS
Once you finished the above tutorial you should be able to build your own Cookbooks and recipes or use the Chef Market.
Interested to learn more on how to deploy a Standalone Oracle Database with Chef cookbooks ? Check this tutorial.
Interested to learn more on how to deploy Middleware/Weblogic Chef cookbooks ? Check this GitHub Chef Samples.
**The views expressed in this post are my own and do not necessarily reflect the views of Oracle.