tag:blogger.com,1999:blog-41350163784926627192024-03-28T12:44:42.079+05:30MiddlewareTimesAjithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.comBlogger124125tag:blogger.com,1999:blog-4135016378492662719.post-28336482318371312172020-10-30T07:18:00.001+05:302020-10-30T07:18:08.317+05:30Auto-labeling Kubernetes resources with Kyverno<p><span style="font-weight: 400;">As Kubernetes has become the foundational building block for enterprises to go cloud native, the last couple of years have seen many solutions that have simplified the cluster creation process. But the Day-2 operations around Kubernetes still remains a complex endeavor, slowing down adoption and increasing the operational costs. Kubernetes complexity and skills gaps still remain the biggest factors that are in the way of Enterprise’s adoption of Kubernetes.</span></p>
<p> </p>
<p><span style="font-weight: 400;">Many of the Day-2 operations use cases include requirements for the central platform team to deliver secure and compliant environments to developers as efficiently as possible with necessary services and best practices preconfigured. Some examples of such use cases include configuring environments with Kubernetes best practices like resource quotas, network policy and pod security. This requires tools that can assess the environments as they are created and then configure them in compliance with the standard defined by the central platform team.</span></p>
<p> </p>
<p><span style="font-weight: 400;">Kubernetes provides constructs like admission control webhooks that can be leveraged for the purposes of validating and mutating resources. Nirmata’s</span> <a href="https://kyverno.io"><span style="font-weight: 400;">Kyverno</span></a> <span style="font-weight: 400;">was designed specifically to address these type use cases using the declarative paradigm. Kyverno is an open-source policy engine that was designed for Kubernetes, It provides users with familiar constructs to write custom rules and easily implement to validate, mutate and generate new resources as needed.</span></p>
<p> </p>
<p><span style="font-weight: 400;">Managing Kubernetes at scales requires following best practices and applying standardization across configurations. One such pattern is to use Kubernetes labels. In Kubernetes, every resource can have one or more labels and Kubernetes makes it easy to find and manage the resources using labels.</span></p>
<p> </p>
<p><span style="font-weight: 400;">A very common use case for Day-2 operations is managing labels across namespaces and pods so that use cases like certificate updates, self-service logging/monitoring, backups etc. can be easily implemented by other Kubernetes controllers and operators.</span></p>
<p> </p>
<p><span style="font-weight: 400;">Below is an example of how to implement namespace labelling upon creation in a Kubernetes cluster using Kyverno. </span></p>
<p> </p>
<p><span style="font-weight: 400;">Install Kyverno in your cluster – </span></p>
<pre><span style="font-weight: 400;">kubectl create -f https://github.com/kyverno/kyverno/raw/master/definitions/install.yaml</span></pre>
<p><span style="font-weight: 400;">Detailed installation instructions are available</span> <a href="https://kyverno.io/docs/installation/"><span style="font-weight: 400;">here</span></a><span style="font-weight: 400;">.</span></p>
<p> </p>
<p><span style="font-weight: 400;">Here is a sample Kyverno policy that adds labels to namespaces – </span></p>
<p><img loading="lazy" class="alignnone size-large wp-image-6969" src="https://nirmata.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.26-PM-1024x824.png" alt="" width="1024" height="824" srcset="https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.26-PM-1024x824.png 1024w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.26-PM-300x242.png 300w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.26-PM-768x618.png 768w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.26-PM-700x564.png 700w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.26-PM-1100x886.png 1100w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.26-PM.png 1252w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight: 400;">The policy inserts a label `</span><span style="font-weight: 400;">kyverno/user`</span><span style="font-weight: 400;">with the value of the user making the API request to create the namespace. The policy also inserts a label `</span><span style="font-weight: 400;">kyverno/network</span><span style="font-weight: 400;">`, but only if one is not already specified by the user. This simple policy demonstrates some powerful features in Kyverno like</span> <a href="https://kyverno.io/docs/writing-policies/writing-policies-variables/"><span style="font-weight: 400;">variable substitution</span></a> <span style="font-weight: 400;">and</span> <a href="https://kyverno.io/docs/writing-policies/writing-policies-validate/"><span style="font-weight: 400;">conditional anchors</span></a><span style="font-weight: 400;">.</span></p>
<p> </p>
<p><span style="font-weight: 400;">Once the policy is configured in your cluster, create a new namespace and verify the labels have been added to the namespace automatically.</span></p>
<pre><span style="font-weight: 400;">/ # kubectl create ns test</span>
<span style="font-weight: 400;">namespace/test created</span>
<span style="font-weight: 400;">/ # kubectl get ns test -o yaml</span></pre>
<p><img loading="lazy" class="alignnone size-large wp-image-6972" src="https://nirmata.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.48-PM-1024x352.png" alt="" width="1024" height="352" srcset="https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.48-PM-1024x352.png 1024w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.48-PM-300x103.png 300w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.48-PM-768x264.png 768w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.48-PM-700x241.png 700w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.48-PM-1100x378.png 1100w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.55.48-PM.png 1244w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p> </p>
<p><span style="font-weight: 400;">Now, what if you want to make sure that users cannot update a specific label? Kyverno makes that easy to do as well!</span></p>
<p><span style="font-weight: 400;">Here is a policy that prevents update of the `</span><span style="font-weight: 400;">kyverno/network</span><span style="font-weight: 400;">` label:</span></p>
<p><img loading="lazy" class="alignnone size-large wp-image-6970" src="https://nirmata.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.56.29-PM-1024x864.png" alt="" width="1024" height="864" srcset="https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.56.29-PM-1024x864.png 1024w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.56.29-PM-300x253.png 300w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.56.29-PM-768x648.png 768w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.56.29-PM-700x591.png 700w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.56.29-PM-1100x928.png 1100w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-29-at-5.56.29-PM.png 1242w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p> </p>
<p><span style="font-weight: 400;">Managing Kubernetes configurations can be complex, and policy engines provide standardization, automated validation, and the ability to mutate and generate configurations.</span></p>
<p> </p>
<p><strong>Summary</strong></p>
<p><span style="font-weight: 400;">Kyverno is an open-source policy engine designed for Kubernetes. It has a minimal learning curve, and provides tremendous flexibility for Kubernetes administrators to solve Day-2 operations challenges using Kubernetes’ powerful declarative management capabilities and native tools. </span></p>
<p> </p>
<p><span style="font-weight: 400;">Try</span> <a href="https://kyverno.io"><span style="font-weight: 400;">Kyverno</span></a></p>
<p> </p>
<p><span style="font-weight: 400;">Try</span> <a href="https://try.nirmata.io"><span style="font-weight: 400;">Nirmata</span></a><span style="font-weight: 400;"> </span></p>
<br />
<br />
source <a href="https://nirmata.com/2020/10/30/auto-labeling-kubernetes-resources-with-kyverno/">https://nirmata.com/2020/10/30/auto-labeling-kubernetes-resources-with-kyverno/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-2751976133791056082020-10-30T02:18:00.001+05:302020-10-30T02:18:20.856+05:30How to Manage Hundreds of Clusters<p><span style="font-weight: 400;">Most Kubernetes journeys start with a cluster or two, at which point manually installing monitoring and security applications and handling updates isn’t a problem. But as the Kubernetes footprint expands, the number of clusters can also balloon quickly. This means not only more clusters, but also more developers who provision clusters, and more workloads running on the clusters. </span></p>
<p><span style="font-weight: 400;">As more people in the organizations start using Kubernetes, an ad-hoc approach is unlikely to result in the kind of organizational consistency needed not only to ensure that all the correct tools are installed every time but also that clusters can <a href="https://nirmata.com/2020/08/18/complexity-your-day-2-enemy/">be updated as needed,</a> debugged easily and that there is a procedure in place to deal with failures. <a href="https://nirmata.com/2020/08/14/use-virtual-clusters-to-tame-sprawl-in-kubernetes/">Multicluster management tools</a> allow central teams to <a href="https://nirmata.com/2020/07/29/how-policy-engines-make-day-2-easier/">ensure consistency</a> in an organization’s clusters while still giving development teams the freedom to provision a new cluster whenever necessary. </span></p>
<p><span style="font-weight: 400;">Why does multicluster management matter? And how should organizations approach it? Here’s what we’ve learned. </span></p>
<h2><b>Security, monitoring and shared services provisioning</b></h2>
<p><span style="font-weight: 400;">In many enterprises, development teams are able to self-serve and create, deploy and delete clusters as needed. The central platform team, on the other hand, needs to make sure that as developers self-serve they both set up the correct policies and configurations as well as install all of the necessary tools and applications on the cluster. Every cluster, for example, is going to need a monitoring application, a security application, a policy engine, and other applications for basic housekeeping. The platform team needs to make sure that these applications are set up automatically whenever a new cluster is provisioned — both to ensure that it happens and to make the cluster creation process easier and faster for developers. </span></p>
<h2><b>Updates on the fly</b></h2>
<p><span style="font-weight: 400;">Central platform teams are also responsible for keeping all of the organization’s clusters and shared services up to date. When there’s a new version of Kubernetes or a security patch in Kubernetes or a shared service, these teams need to have a way to update hundreds of clusters in a way that is consistent, fast and error-free. In the vast majority of cases, updates need to be applied across the board, and there is no difference in how each cluster should be treated even if the clusters are running on different infrastructure stacks. Using a multicluster management tool automates the update process and ensures that no clusters are missed. </span></p>
<h2><b>On the edge</b></h2>
<p><span style="font-weight: 400;">When companies need to deploy applications at the edge (e.g. store fronts), they will likely have multiple clusters, often in different regions, but they need to provide a consistent experience for the end user, whether the end user is a cashier using a point of sale system or a reader accessing content on a mobile phone. </span></p>
<p><span style="font-weight: 400;">There will already be so many variables to consider between the different clusters that complete consistency between the clusters is critical to responding to any failure. It’s also important to have visibility into all the clusters so that the central team can easily spot any problems and take action if necessary. </span></p>
<h2><b>Keeping things consistent</b></h2>
<p><span style="font-weight: 400;">Multicluster management is all about ensuring consistency across all of the clusters in the organization. When clusters have a consistent stack, are configured according to organizational governance policies instead of in an ad-hoc manner, have a standard set of monitoring tools, and are as similar as possible in terms of stack and environment, it becomes much easier to respond to incidents and in general to manage the entire lifecycle. </span></p>
<p><span style="font-weight: 400;">Debugging in particular becomes much easier when clusters are consistent, because it reduces the number of variables that could be causing a problem with a particular cluster or with an application. </span></p>
<h2><b>Complexity</b></h2>
<p><span style="font-weight: 400;">As the Kubernetes footprint grows, so does the system’s complexity. The biggest mistake organizations make at the beginning of the process is underestimating how complex a cloud native application suite is and not putting the tools and processes in place to manage that complexity. This complexity is even greater as organizations think about deploying on the edge and using multiple cloud providers and/or a hybrid cloud approach. </span></p>
<p><span style="font-weight: 400;">If there are too many variables that have to be taken into account and too many manual steps, errors are inevitable. Central teams can’t realistically manage hundreds of clusters manually without automation tools. Nor can different developers and development teams be trusted to configure their clusters in exactly the same way — unless there are tools in place to handle those configurations automatically. </span></p>
<p><span style="font-weight: 400;">Tools like Nirmata make it possible for small central teams to get cross-cluster visibility, ensure security, control where workloads run and easily manage Day 2 operations like updates in a consistent manner. When you’re dealing with hundreds of clusters, it’s not possible to update each one manually or to check the health of each cluster on a regular basis. With Nirmata, everything related to cluster health can be handled in one interface, so platform teams don’t need to toggle between dashboards or confuse themselves about which clusters have been updated and which ones haven’t. </span></p>
<p><span style="font-weight: 400;">Request a <a href="https://info.nirmata.com/nirmata-demo">demo now</a>. </span></p>
<br />
<br />
source <a href="https://nirmata.com/2020/10/29/how-to-manage-hundreds-of-clusters/">https://nirmata.com/2020/10/29/how-to-manage-hundreds-of-clusters/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-17876311626149192452020-10-14T03:18:00.001+05:302020-10-14T03:18:09.726+05:30Automated bootstrapping of Vault for Kubernetes secrets management using Nirmata<p><span style="font-weight: 400;">HashiCorp Vault provides secure access to secrets and manages sensitive information. In an earlier</span> <a href="https://nirmata.com/2018/12/19/managing-kubernetes-secrets-with-hashicorp-vault-and-nirmata/"><span style="font-weight: 400;">post</span></a><span style="font-weight: 400;">, we described how HashiCorp Vault can be used to manage secrets in Kubernetes using Nirmata. Since then Vault’s support for Kubernetes has evolved. HashiCorp has released the</span> <a href="https://www.vaultproject.io/docs/platform/k8s/injector"><span style="font-weight: 400;">Vault Agent Injector</span></a> <span style="font-weight: 400;">which automates the process of fetching the relevant secrets from Vault using a sidecar container that is added to a pod. Nirmata fully supports this capability. However, the process of bootstrapping newly created clusters for Vault remained a manual process with multiple steps that had to be coordinated across Vault and the new cluster. In this post, I will describe how Nirmata now fully automates the configuration of Vault for new Kubernetes clusters.</span></p>
<p><span style="font-weight: 400;">In an enterprise, usually multiple Kubernetes clusters are used and secrets management is required for all these clusters. Typically, a central Vault application service is deployed, either in one of the management / shared Kubernetes clusters. Before you can start using Vault in your Kubernetes cluster, a Kubernetes Auth method for your cluster needs to be configured in Vault, with cluster specific information such as the JWT token for a role that Vault can use to securely access the cluster. The steps for this process are described</span> <a href="https://learn.hashicorp.com/tutorials/vault/agent-kubernetes?in=vault/kubernetes"><span style="font-weight: 400;">in the Vault documentation</span></a><span style="font-weight: 400;">. Once the Kubernetes auth method is set up in Vault, the path information then needs to be configured in the new cluster so that workloads can connect to the right authentication path.</span></p>
<p><span style="font-weight: 400;">If you have development teams deploying clusters on-demand, it is cumbersome to manually configure the Kubernetes auth method for each cluster. This requires automation so that as soon as new clusters are provisioned, the Kubernetes auth path is configured in Vault.</span></p>
<p><span style="font-weight: 400;">Nirmata automates the creation of Kubernetes auth path in Vault whenever a new cluster is created. Nirmata has added native integration with Vault to enable this capability. You can add information about your Vault installation in the Integration -> Vault panel in Nirmata. </span></p>
<p><span style="font-weight: 400;"><img loading="lazy" class="aligncenter size-large wp-image-6919" src="https://nirmata.com/wp-content/uploads/2020/10/image-1-1024x696.png" alt="" width="1024" height="696" srcset="https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-1-1024x696.png 1024w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-1-300x204.png 300w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-1-768x522.png 768w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-1-1536x1045.png 1536w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-1-2048x1393.png 2048w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-1-700x476.png 700w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-1-1100x748.png 1100w" sizes="(max-width: 1024px) 100vw, 1024px" /></span></p>
<p><span style="font-weight: 400;">Next, when creating a cluster type (a reusable policy with common cluster configuration), you can provide the configuration for your Kubernetes auth path along with default roles that you would like to configure for the cluster. In the auth path, you can use variable ${cluster.name} to include the cluster name in the auth path. This ensures that a unique auth path is created for each cluster.</span></p>
<p><span style="font-weight: 400;"><img loading="lazy" class="aligncenter size-large wp-image-6920" src="https://nirmata.com/wp-content/uploads/2020/10/image-2-1024x706.png" alt="" width="1024" height="706" srcset="https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-2-1024x706.png 1024w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-2-300x207.png 300w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-2-768x530.png 768w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-2-1536x1059.png 1536w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-2-700x483.png 700w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-2-1100x759.png 1100w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/10/image-2.png 1830w" sizes="(max-width: 1024px) 100vw, 1024px" />You can also add the</span> <a href="https://github.com/nirmata-add-ons/vault-agent-injector"><span style="font-weight: 400;">vault agent injector</span></a> <span style="font-weight: 400;">as an add-on in your cluster type so that it is deployed automatically on each cluster. Now, whenever a new cluster is created using this cluster type, Nirmata will automatically configure the auth path in Vault along with the specified roles. Nirmata will also deploy the vault agent injector so that you can immediately start using Vault for secrets management.</span></p>
<p><span style="font-weight: 400;">As a result of the automatic configuration of Vault, it is now possible to deliver secrets management capabilities for every cluster that is deployed using Nirmata or registered with Nirmata. This also allows automating the deployment of other add-on services such as agents for security, monitoring, and logging, that require credentials to authenticate with their service endpoints. Now, with Nirmata and HashiCorp Vault you can deliver fully configured clusters on-demand or facilitate self-service provisioning of Kubernetes clusters.</span></p>
<br />
<br />
source <a href="https://nirmata.com/2020/10/13/automated-bootstrapping-of-vault-for-kubernetes-secrets-management-using-nirmata/">https://nirmata.com/2020/10/13/automated-bootstrapping-of-vault-for-kubernetes-secrets-management-using-nirmata/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-71763639655952928042020-09-15T06:18:00.001+05:302020-09-15T06:18:05.085+05:30Windows Workload Management<p>Sam Silbory, Solutions Architect at Nirmata, walks through everything you need to know about Windows containers to build and deploy them as well as Windows Kubernetes nodes. Additionally, he’ll touch on ASP.NET containers and gotchas you’ll encounter when running Windows containers.</p>
<a href="https://nirmata.com/2020/09/14/windows-workload-management/"><img src="//i.ytimg.com/vi/AWj2lWDaiI0/hqdefault.jpg" alt="YouTube Video" /></a><br />
<br />
<p>For more on workload management, check out our <a href="https://nirmata.com/resources/">resources section</a>.</p>
<br />
<br />
source <a href="https://nirmata.com/2020/09/14/windows-workload-management/">https://nirmata.com/2020/09/14/windows-workload-management/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-52273007657028896682020-09-10T16:18:00.001+05:302020-09-10T16:18:06.621+05:30How to Import Helm Charts<p style="text-align: left;">Watch this video to learn how to import Helm charts in under 7 minutes.</p>
<p style="text-align: left;"></p>
<p style="text-align: left;"><a href="https://nirmata.com/2020/09/10/how-to-import-helm-charts/"><img src="//i.ytimg.com/vi/mbbZ8UZftjY/hqdefault.jpg" alt="YouTube Video" /></a><br />
<br /></p>
<p style="text-align: left;"></p>
<p style="text-align: left;">Looking for more content on Helm? Check out <a href="https://nirmata.com/2020/06/04/why-do-devops-engineers-love-helm/">Why Do DevOps Engineers Love Helm?</a></p>
<br />
<br />
source <a href="https://nirmata.com/2020/09/10/how-to-import-helm-charts/">https://nirmata.com/2020/09/10/how-to-import-helm-charts/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-66929506912654759312020-08-25T18:18:00.001+05:302020-08-25T18:18:29.065+05:30Nirmata EKS Manager Available in AWS Marketplace<p>Nirmata, Inc., a leading provider of Kubernetes management platform has announced the availability of Nirmata EKS Manager, an integrated solution designed for Amazon Web Services (AWS) users, in AWS Marketplace.</p>
<p>Adoption of Kubernetes in the enterprise continues to accelerate and Amazon Elastic Kubernetes Service (Amazon EKS) is one of the most popular managed Kubernetes services today. As Amazon EKS adoption grows, enterprise teams can sometimes face challenges around Day 2 Kubernetes operations. Nirmata EKS manager has been designed to address these challenges. Nirmata EKS Manager solves the problem by providing On-demand cluster provisioning, centralized visibility, and compliance, multi-cluster application management for Amazon EKS.</p>
<h2>More details about our solution:</h2>
<h3>On-demand cluster provisioning</h3>
<p>Development teams need the ability to provision clusters on-demand but they do not want to deal with configuring networking, storage, and other infrastructure components. Nirmata’s unique approach allows operations teams to create predefined cluster configurations that can be used by developers to provision clusters that are secure and compliant.</p>
<h3>Centralized visibility and compliance</h3>
<p>As the number of clusters grows, operations teams need full visibility across these clusters and also need the ability to set policies to ensure compliance. Nirmata provides comprehensive visibility into cluster and node health, resource allocation, and utilization as well as costs across all your clusters in any AWS Region. Nirmata also includes the <a href="https://kyverno.io/">open-source Kyverno policy engine</a> along with predefined best practice policies to ensure workloads running on the clusters are secure and compliant.</p>
<h3>Multi-cluster application management</h3>
<p>Increasingly, applications need to be deployed and managed across multiple clusters for high availability or these applications deliver some common core services (e.g. security, monitoring, etc.). Streamlining the application management across multiple clusters ensures that your clusters are always up-to-date and consistent. Nirmata provides a robust application management tooling to make multi-cluster application deployment a breeze.</p>
<p> </p>
<p>“Enterprises are accelerating their digital strategies and have truly embraced Kubernetes as their foundation. Our mission is to accelerate the enterprise cloud-native journey,” says Jim Bugwadia, Founder and CEO at Nirmata. “As enterprises adopt Kubernetes, they sometimes face challenges related to Day 2 Kubernetes operations across multiple clusters. Enterprise platform teams need to strike a delicate balance between enabling developer agility and flexibility while ensuring compliance and controlling costs. Nirmata EKS Manager supports Amazon EKS and several other AWS services to deliver a comprehensive Kubernetes platform for enterprises of virtually all sizes.” Customer-centric SaaS</p>
<p>Nirmata EKS manager is delivered as a secure and scalable cloud-based software-as-a-service (SaaS) and has an integrated chat tool to reach our global customer success team. Our customer-success team partners with our customers across their entire journey and is always available 24/7 for enterprise customers to help with Kubernetes issues. The Nirmata EKS Manager offers integrated billing with AWS, so customers can enjoy the benefits of “pay-as-you-grow” pricing and a single bill for their cloud services.</p>
<h2>Availability</h2>
<p>Try Nirmata EKS manager today in <a href="https://aws.amazon.com/marketplace/pp/B089DW54DY">AWS Marketplace</a>.</p>
<br />
<br />
source <a href="https://nirmata.com/2020/08/25/nirmata-eks-manager-available-in-aws-marketplace/">https://nirmata.com/2020/08/25/nirmata-eks-manager-available-in-aws-marketplace/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-53786249942367489612020-08-19T05:18:00.001+05:302020-08-19T05:18:19.878+05:30Complexity: Your Day 2 Enemy<p><span style="font-weight: 400;">Successfully managing <a href="https://nirmata.com/blog/">Kubernetes on Day 2</a> often boils down to successfully taming complexity. The more complex the environment, the more challenging it is to monitor, update and heal. Even with only one cluster, there will be multiple components that need tracking — services, agents, networking and storage. Every part of the cluster has to be monitored for security issues and patched if one is found. Multiplied by the dozens or hundreds of clusters in a typical environment, and it’s unreasonable to expect that <a href="https://nirmata.com/2020/07/09/how-to-overcome-the-day-2-kubernetes-skills-gap/">humans would be able to wrap their heads</a> around the many moving parts without the right tools. </span></p>
<p><span style="font-weight: 400;">There’s good news and bad news for complexity management in Kubernetes. The bad news is that Kubernetes and containers in general create a more complex system than virtual machine-based environments. The good news, though, is that Kubernetes has a powerful declarative API interface that makes it possible to manage all of these components in a consistent way. </span></p>
<h2><b>The role of complexity</b></h2>
<p><span style="font-weight: 400;">In fact, Kubernetes’ complexity isn’t always a bad thing. Kubernetes’ flexibility and extensibility are one of its main selling points, but both of those things contribute to complexity. It’s also not necessarily a bad idea to install Kubernetes manually, and even to operate it manually, as part of learning how Kubernetes works. </span></p>
<p><span style="font-weight: 400;">The problem is that the more complex a manual task is, the more likely that critical steps are overlooked or done incorrectly. Manually installing Kubernetes once is a good learning experience, but a bad way to <a href="https://nirmata.com/2020/08/04/kubernetes-scaling-strategies/">scale Kubernetes adoption</a> throughout the organization. </span></p>
<h2><b>Complexity during set-up</b></h2>
<p><span style="font-weight: 400;">If an organization is going to bring hundreds of clusters a day, whether it is virtual clusters or physical clusters, there’s absolutely no question that the process needs to be as simple as possible. Taking several hours to manually configure Kubernetes the first couple times is a very good way to learn how the platform works, but it does not scale. </span></p>
<p><span style="font-weight: 400;">Not only does a complicated cluster spin-up process slow down development, it also increases the risk of mistakes and oversights. The manual steps needed to launch or operate a cluster should be as simple as possible — ideally, with a policy engine like</span> <a href="https://kyverno.io/"><span style="font-weight: 400;">Kyverno</span></a> <span style="font-weight: 400;">in place so that when mistakes inevitably do happen they are automatically fixed. Taming complexity in Kubernetes, at an organizational level, isn’t just about controlling how one individual manages configurations, but rather creating complete organization-wide consistency. </span></p>
<p><span style="font-weight: 400;">This becomes increasingly important at scale. Reducing unnecessary complexity also <a href="https://nirmata.com/2020/06/30/preparing-for-kubernetes-day-2-on-day-0/">requires a level of consistency</a> that’s nearly impossible to achieve without organization-wide guardrails and automation tools. If every cluster in the system is different — uses different storage types, has a different networking set-up — it is much more complex to operate. This type of complexity also adds no value to the system, and should be reduced whenever possible. </span></p>
<p><span style="font-weight: 400;">A smooth Day 2 experience ultimately relies on a consistent, error-free configuration at the design, development and launch phase. The more manual steps in that process, the more likely problems are to arise on Day 2. </span></p>
<h2><b>Operational complexity</b></h2>
<p><span style="font-weight: 400;">As long as the system has been set up in a way that minimized complexity and maximized consistency, operational complexity should be easily manageable with the right automation tools. It’s impossible, however, to separate operational complexity from the deployment phase. If organizations wait until an application is in production to consider how the lack of consistency impacts availability and security they will almost inevitably be unable to run the application — and that’s especially true when multiplied across the many applications in a typical organization’s portfolio. </span></p>
<h2><b>Focus on the unpredictable</b></h2>
<p><span style="font-weight: 400;">In complex environments, the challenges that come up are not always predictable. Yet operations engineers have limited time and a limited ability to focus on everything at once. No team will ever be able to automate away all of the potential operational challenges in Kubernetes, but by automating the repeatable, predictable part of the operations story, platform teams are able to devote more time to the unexpected. In addition, automating as much of the set-up process and ensuring consistent application of best practices reduces the likelihood of unpleasant surprises at runtime. </span></p>
<p><span style="font-weight: 400;">When automation tools handle the predictable, repeatable parts of both initial configuration and operations, engineers have more time to focus on both any unexpected challenges as well as making incremental improvements in availability, performance and security. They are able to track how the application is performing not just technically, but also against the organization’s business objectives. Those are tasks an automation tool can’t do. </span></p>
<h2><b>Conclusion</b></h2>
<p><span style="font-weight: 400;">Kubernetes is complex, but the experience for developers and cluster administrators using Kubernetes doesn’t have to be. Organizations should focus on both minimizing Kubernetes inherent complexity by ensuring consistent configurations and consistent application design across clusters while also using tools that simplify the developer and operator experience. </span></p>
<p><span style="font-weight: 400;">Nirmata helps organizations tame complexity at both the deployment and operations stage, so that Day 2 operations are as simple as possible. See how it works</span> <a href="https://try.nirmata.io/"><span style="font-weight: 400;">here</span></a><span style="font-weight: 400;">. </span></p>
<br />
<br />
source <a href="https://nirmata.com/2020/08/18/complexity-your-day-2-enemy/">https://nirmata.com/2020/08/18/complexity-your-day-2-enemy/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-72062982866316830412020-08-15T02:18:00.001+05:302020-08-15T02:18:13.666+05:30Use Virtual Clusters to Tame Sprawl in Kubernetes<p><span style="font-weight: 400;">Virtual clusters are the answer to a tricky balancing act: Developers need <a href="https://nirmata.com/2020/07/03/enabling-secure-and-self-service-kubernetes-clusters/">the freedom to self-serve</a>, but without the potential for a developer’s error causing a security or operational risk that compromises the entire system. </span></p>
<p><span style="font-weight: 400;">Virtualization in general is a way to apply software-defined segmentation, isolation, and management to virtual representations of physical resources, whether it is storage or machines or clusters. In addition to other benefits, virtualization allows developers to safely self-serve. Many new technologies have followed a similar trajectory — think about servers and virtual machines. Now as more organizations adopt Kubernetes and start to struggle with best practice enforcement as well as the management and resource utilization problems <a href="https://nirmata.com/2020/06/15/what-is-day-2-kubernetes/">related to cluster sprawl</a>, they are starting to apply the same <a href="https://nirmata.com/2019/08/26/virtual-kubernetes-clusters/">virtualization techniques to clusters.</a> </span></p>
<h2><b>How virtual clusters work</b></h2>
<p><span style="font-weight: 400;">Virtual clusters improve resource utilization by packing multiple virtual clusters onto a single physical cluster. While virtual clusters are often used interchangeably with namespaces, the two concepts are not identical. Namespaces are the foundation for virtual clusters, but virtual clusters allow (and require) each cluster to be configured separately from each other, allowing access controls, security policies, network policies and resource limits to be configured differently for each virtual cluster. The advantage of virtual clusters is that for users, they mostly appear and behave just like physical clusters.</span></p>
<p><span style="font-weight: 400;">Using virtual clusters, however, can also make it easier to ensure that organizational governance policies are uniformly enforced throughout the organization. Adding the virtualization layer makes it easier to use automation tools, <a href="https://nirmata.com/2020/07/29/how-policy-engines-make-day-2-easier/">including a policy engine</a> like</span> <a href="https://kyverno.io/"><span style="font-weight: 400;">Kyverno</span></a><span style="font-weight: 400;">, to audit, mutate and create policies and ensure that best practices in terms of security settings, resource utilization and monitoring are set up appropriately. </span></p>
<h2><b>Tackling cluster sprawl</b></h2>
<p><span style="font-weight: 400;">As Kubernetes scales across the enterprise and individual applications scale up, cluster sprawl becomes a real threat to both Day 2 management as well as the budget. Organizations face a Goldilocks problem when it comes to <a href="https://nirmata.com/2020/08/04/kubernetes-scaling-strategies/">cluster sizing</a>, and thus cluster sprawl. Clusters that are too large (more than a hundred nodes) present networking challenges; too many very small clusters become challenging to manage and don’t use resources efficiently. </span></p>
<p><span style="font-weight: 400;">Virtual clusters are a way to tackle cluster sprawl by putting more virtual clusters into each physical cluster. In addition, the fact that the clusters are software-defined makes it easier to use automation tools to audit and monitor the clusters. </span></p>
<h2><b>How this looks to developers</b></h2>
<p><span style="font-weight: 400;">With virtual clusters, the end experience for users is essentially the same as if they were spinning up a physical cluster. Both the Kubernetes data plane and control plane are virtualized, so the interface that developers see is unchanged. </span></p>
<p><span style="font-weight: 400;">Using virtual clusters is a way to balance the ability of developers to self-serve with the need for centralized control over best practices. Operators can easily manage both the physical and virtual clusters centrally, without becoming a bottleneck for development teams who want to spin up new (virtual) clusters whenever needed. </span></p>
<h2><b>Virtual clusters and Day 2</b></h2>
<p><span style="font-weight: 400;">Because virtual clusters are software-defined, it’s easier to audit, track and manage them. Many Day 2 problems come down to managing complexity. When clusters are set up correctly from the beginning, are neither too large or too small, and have appropriate monitoring capabilities backed-in, Day 2 becomes much easier. </span></p>
<h2><b>Are virtual clusters challenging?</b></h2>
<p><span style="font-weight: 400;">One of the most persistent misconceptions about virtual clusters is that they are very difficult to set up and manage. Another related misconception is that virtual clusters are insecure, because they don’t provide the same level of isolation that you would see between virtual machines, for example. </span></p>
<p><span style="font-weight: 400;">First of all, software multi-tenancy is not particularly challenging to manage once it’s automated. Kubernetes itself has a fairly steep learning curve — if the organization is already being successful with Kubernetes, the additional skills needed to set up virtual clusters are relatively easy to acquire, especially if you’re using a platform like Nirmata. </span></p>
<p><span style="font-weight: 400;">Secondly, virtual clusters do provide workload isolation and can be secure enough for more enterprises. If organizations are using virtual clusters correctly and using a policy engine to ensure adherence to best practices, they ensure that every virtual cluster has the right configurations related to resource quotas, network policies, access controls and namespaces. In Kubernetes, isolation is achieved through configuration best practices. As long as these best practices are followed, virtual clusters will be isolated from each other even if they’re running on the same physical cluster. </span></p>
<p><span style="font-weight: 400;">With Nirmata, platform and IT operations teams can make it easy for developers to request specific resources and services and have a virtual cluster automatically spun up for them. Cluster administrators still have visibility over the resource consumption and can adjust capacity limits and other configurations if the cluster is either approaching its limits or isn’t performing according to the SLAs. See</span> <span style="font-weight: 400;">how it works</span> <a href="https://nirmata.com/"><span style="font-weight: 400;">here</span></a><span style="font-weight: 400;">. </span></p>
<br />
<br />
source <a href="https://nirmata.com/2020/08/14/use-virtual-clusters-to-tame-sprawl-in-kubernetes/">https://nirmata.com/2020/08/14/use-virtual-clusters-to-tame-sprawl-in-kubernetes/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-10524892769065588872020-08-04T23:18:00.001+05:302020-08-04T23:18:04.258+05:30Kubernetes Scaling Strategies<p><span style="font-weight: 400;">Scaling, especially autoscaling, is one of Kubernetes’ biggest attractions. Using Kubernetes makes it easier to scale applications up and down, either because of fluctuations in usage patterns or because the application is adding users. </span></p>
<p><span style="font-weight: 400;">Just because Kubernetes simplifies scaling doesn’t mean that organizations don’t have to think about scaling at all. There are different ways to scale in Kubernetes as well as best practices to follow. Smart organizations will evaluate the pros and cons of different scaling strategies and decide how to manage it best given the technical and organizational priorities. <a href="https://nirmata.com/2020/07/29/how-policy-engines-make-day-2-easier/">Kubernetes can handle</a> the actual scaling automatically, but <a href="https://nirmata.com/2020/07/09/how-to-overcome-the-day-2-kubernetes-skills-gap/">humans need to determine the strategy</a> and tell Kubernetes what to do. </span></p>
<h2><b>What does ‘scaling’ mean?</b></h2>
<p><span style="font-weight: 400;">There are actually two ways to think about scaling. The first one is probably what most readers think of first: Scaling an application up or down due to changes in usage. But that’s not the only thing to think about. Scaling Kubernetes can also mean expanding Kubernetes’ footprint across the enterprise and increasing the number of applications running in Kubernetes. As organizations think about scaling strategies, they should consider both types of scaling, because the strategies involved are related. An organization with a single but very popular application running in Kubernetes will have different challenges from an organization with many lesser-used applications, but they are all a question of scale. </span></p>
<h2><b>What to centralize? </b></h2>
<p><span style="font-weight: 400;">One of the most important considerations when considering scaling strategies is how to centralize the visibility, governance, and security controls that really should be handled by a team of specialists while still giving <a href="https://nirmata.com/2020/07/03/enabling-secure-and-self-service-kubernetes-clusters/">developers as much freedom as possible to self-serve</a>. Where to draw the line isn’t always obvious, but can have ramifications for how resilient the organization’s tech stack is as well as how smoothly the <a href="https://nirmata.com/2020/06/15/what-is-day-2-kubernetes/">Day 2 operations go.</a> </span></p>
<p><span style="font-weight: 400;">Choosing the right guardrails to put in place — and ensuring that Kubernetes isn’t used differently by each team in the organization — is essential to the project’s long-term success in the enterprise. </span></p>
<h2><b>Best practices</b></h2>
<p><span style="font-weight: 400;">There’s no one-size-fits-all best strategy for managing scaling. However, there are best practices that all organizations should follow, regardless of how they choose to approach scaling. </span></p>
<h3><b>Automate everything</b></h3>
<p><span style="font-weight: 400;">The beauty of Kubernetes is in declarative configuration management, where humans can declare the desired outcome and the system works to match the current state to the desired state. Automate everything that is automate-able and let the highly-trained team members focus on making technical decisions that a computer can’t understand. </span></p>
<h3><b>Keep systems of record</b></h3>
<p><span style="font-weight: 400;">There should be a centralized auditing and record-keeping process that enables organizations to manage version controlling, service catalogues and other organizational records. Without some central record-keeping, the Kubernetes deployments will rapidly become impossible to track. </span></p>
<h3><b>Avoid cluster sprawl</b></h3>
<p><span style="font-weight: 400;">Cluster sprawl happens when the number of clusters becomes unmanageable, usually because organizations are using one cluster per application or per team and neither sharing resources appropriately nor centralizing enough of the management. This leads to problems with security and management as well as resource inefficiency. </span></p>
<h2><b>Finding the right balance</b></h2>
<p><span style="font-weight: 400;">As Kubernetes scales, there are also some technical trade-offs to consider. There are limits to the number of nodes that a cluster can have — more than a couple hundred nodes per cluster and you start having problems with the network and scheduling delays. On the other hand,</span> <a href="https://learnk8s.io/how-many-clusters"><span style="font-weight: 400;">you wouldn’t want to break up</span></a> <span style="font-weight: 400;">a 300-node cluster into 100 three-node clusters, either, because that would lead to unmanageable cluster sprawl and high costs. </span></p>
<p><span style="font-weight: 400;">Likewise, greater central control can come at the cost of developer agility and the ability to self-serve. On the other hand, when each team has its own bespoke Kubernetes stack, it’s impossible to effectively manage Day 2 operations. </span></p>
<p><span style="font-weight: 400;">In our experience, it’s important to enable shared clusters, so that each cluster can be securely used by multiple teams and applications. In practice, this involves</span> <a href="https://nirmata.com/2019/08/26/virtual-kubernetes-clusters/"><span style="font-weight: 400;">creating virtual clusters</span></a><span style="font-weight: 400;">, using namespaces and other Kubernetes security constructs on top of clusters. This enables developers to continue self-serving, and spinning up their own cluster whenever needed while still giving operators the centralized control needed to ensure Day 2 operations go smoothly. </span></p>
<p><span style="font-weight: 400;">Automating configuration management is crucial to an organizational scaling strategy based on virtual clusters. Developers will see a virtualized Kubernetes end-point for each virtual cluster, which could potentially let them each choose different versions and different configurations for each virtual cluster. When configurations are automated with a policy engine, organizations can set guardrails on the available configurations, ensuring consistency among all the virtual clusters running on the same physical cluster. </span></p>
<p><span style="font-weight: 400;">Using a policy engine like Kyverno that not only offers pass/fail guardrails but also automatically generate and mutate configurations is key to having both the ethos of ‘automating whatever possible’ as well as ensuring that the system’s operational needs don’t become unmanageable as it scales. Nirmata’s unified management plane also helps organizations tame the operational complexity that increases exponentially with scale by providing a single dashboard to manage the entire system and get visibility. This allows organizations to get centralized operational control without sacrificing the ability of developers to self-serve.</span> <a href="https://nirmata.com/"><span style="font-weight: 400;">Try it out</span></a> <span style="font-weight: 400;">to see how it works. </span></p>
<br />
<br />
source <a href="https://nirmata.com/2020/08/04/kubernetes-scaling-strategies/">https://nirmata.com/2020/08/04/kubernetes-scaling-strategies/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-82804034097540627052020-07-31T02:54:00.001+05:302020-07-31T02:54:27.497+05:30Chaos In The Time Of Covid<p style="text-align:center;"><em>“See, here I’m now sitting by myself, uh, er, talking to myself. That’s, that’s chaos theory.”</em><br />
<em>– Jeff Goldblum as Ian Malcom, Jurassic Park</em></p>
<p>Hello all! I know it’s been a while between posts here at the Agile Admin. Everyone’s safe and healthy, though. We’ve been quiet but busy, and in a twist of happy fate many of us are working together again!</p>
<p>James, Karthik, Bill, and Ernest are all now at <a href="https://www.verica.io/">Verica</a>, a chaos engineering startup founded by Casey Rosenthal and Aaron Rinehart. It’s 100% remote, with people from Portland to Portland, as we like to say (Maine to Oregon). We’re still working on the initial release of the product; my team (which includes Karthik and Bill) is working on the Kubernetes module. Really interesting stuff! Casey literally <a href="https://www.amazon.com/Chaos-Engineering-System-Resiliency-Practice/dp/1492043869">co-wrote the book on chaos engineering</a> and it’s a fascinating bleeding edge part of systems engineering. If we can lure Peco over to join us then we’ll have the entire band back together!</p>
<p>Community stuff has been quiet. We had to fight to get our money back from the venue from cancelling DevOpsDays Austin 2020, but we finally prevailed there. The <a href="https://www.meetup.com/CloudAustin/">CloudAustin</a> user group is meeting virtually. And James, Karthik, and I are running the Modern Infrastructure track for <a href="https://www.alldaydevops.com/">All Day DevOps</a> in November. Karthik’s <a href="https://kccnceu20.sched.com/speaker/kgaekwad">speaking at KubeCon</a> in August. We’re doing light work on some LinkedIn Learning courses, though I have to admit with the additional burden of the pandemic I haven’t been getting a lot of side stuff done personally.</p>
<p>As we get on our feet with chaos experimentation and this dang lockdown eases up we hope to be back with our usual mix of technical insight and Texan cussedness! Because let’s be honest, Twitter is where you go to get dumber.</p>
<br />
<br />
from the agile admin https://ift.tt/2XaxAHY<br />
via <a href="https://ifttt.com/?ref=da&site=blogger">IFTTT</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-72866794563397079192020-07-30T19:18:00.001+05:302020-07-30T19:18:06.554+05:30Deny Rules! Fine-Grained Kubernetes Access Controls with Kyverno<p><em>Kubernetes policies for dynamic permissions and fine-grained access controls.</em></p>
<p id="dd96" class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph="">Kubernetes supports role-based access control (RBAC) that enables you to configure a set of permissions for a certain user or group of users, that can access Kubernetes objects in your cluster. This gives you the ability to control API-level resource access for users. But sometimes RBAC is not enough and you may need finer-grained or dynamic access controls. For example, preventing accidental deletion of critical resources. Or, preventing users from modifying or deleting a default network policy, while allowing them to self-manage other network policies. Here is one example of a community <a class="bh et ha hb hc hd" href="https://github.com/kubernetes/kubernetes/issues/10179" target="_blank" rel="noopener nofollow noreferrer">discussion</a> on this topic. Writing a custom admission controller is complicated, in this post, I will show you how Kyverno makes it easy to manage fine-grained access controls as custom policies.</p>
<p id="6df8" class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph="">Briefly, Kyverno is a policy engine built for Kubernetes. It runs as an admission controller that can mutate and validate incoming resources. Also, Kyverno can generate any type of resource-based on various triggers of the admission request. For a validate policy, you can define the desired behavior of an admission request — the request will be blocked if you set the failure action to “enforce”, otherwise the policy will just “audit” the result and create policy violations to report non-compliant configurations. With the support of “enforce” action, it is possible to configure a validate policy to deny specific operations on the selected resources, which is what we will focus on for our use case.</p>
<p id="e990" class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph="">A Kyverno deny policy rule blocks the admission request based on a given set of conditions. Similar to Kubernetes <a class="bh et ha hb hc hd" href="https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/" target="_blank" rel="noopener nofollow noreferrer">Field Selector</a>, Kyerno lets you select the requests by key-value pairs.</p>
<p id="89e9" class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph="">The key can be defined with the fixed value, or it can be dynamically configured using JMESPath, i.e., “” will be replaced by the actual value of the admission request when applying the policy. The supported operators “In” “NotIn” “Equals” and “NotEquals”, provide flexibility to write a generic and simple policy.</p>
<p id="374b" class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph="">Here is an example of the deny policy that denies the UPDATE operation of resources with the label “app=critical”.</p>
<figure class="fz ga gb gc gd ge">
<div class="go r gh"></div>
</figure>
<p class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph=""><a href="https://gist.githubusercontent.com/realshuting/23c506fc8d05ae2e60bffab7d2b48049/raw/1bd74233e10b9e21196462ae6006eabecfd43bce/block-deletion.yaml" target="_blank" rel="noopener noreferrer"><img class="aligncenter wp-image-6837" src="https://nirmata.com/wp-content/uploads/2020/07/Kyverno1-1024x763.png" alt="" width="600" height="447" srcset="https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno1-1024x763.png 1024w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno1-300x223.png 300w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno1-768x572.png 768w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno1-700x521.png 700w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno1-1100x819.png 1100w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno1.png 1356w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph="">In a Kyverno policy, you can select the target resources based on various types. A policy rule can be filtered by the resource information, i.e., kinds, name, namespaces, and label selectors, just like the example above. Also, a rule can be selected by the user information of the admission request, i.e., clusterRoles, serviceAccounts, users, and groups. This is how you can customize fine-grained access for certain resources.</p>
<p id="c2a4" class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph="">Assume we have a user “tenant-admin” who can already delete the deployment, with the following deny policy, you can still block the deletion of the deployments with label “app=critical”. The deletion of deployments without this label is allowed.</p>
<p><a href="https://gist.githubusercontent.com/realshuting/23c506fc8d05ae2e60bffab7d2b48049/raw/1bd74233e10b9e21196462ae6006eabecfd43bce/block-deletion.yaml" target="_blank" rel="noopener noreferrer"><img class="aligncenter wp-image-6838" src="https://nirmata.com/wp-content/uploads/2020/07/Kyverno2-1024x994.png" alt="" width="600" height="582" srcset="https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno2-1024x994.png 1024w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno2-300x291.png 300w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno2-768x745.png 768w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno2-700x679.png 700w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno2-1100x1068.png 1100w, https://3p8owy1gdkoh452nrc36wbnp-wpengine.netdna-ssl.com/wp-content/uploads/2020/07/Kyverno2.png 1358w" sizes="(max-width: 600px) 100vw, 600px" /></a><br />
To summarize, the Kvyerno Deny policy helps achieve fine-grained access controls that cannot be performed using Kubernetes RBAC. These rules can be used to prevent critical resources from being deleted or mutated by unauthorized users.</p>
<p id="9e67" class="ff fg bo fh b fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx cg df" data-selectable-paragraph="">Check out the Kyverno <a class="bh et ha hb hc hd" href="https://github.com/nirmata/kyverno#documentation" target="_blank" rel="noopener nofollow noreferrer">GitHub</a> page to learn more about the validation policy and several other features, like generating configurations. Find more in the previous post <a class="bh et ha hb hc hd" href="https://nirmata.com/2019/07/11/managing-kubernetes-configuration-with-policies/" target="_blank" rel="noopener nofollow noreferrer">Kubernetes Policy Management with Kyverno</a>.</p>
<br />
<br />
source <a href="https://nirmata.com/2020/07/30/deny-rules-fine-grained-kubernetes-access-controls-with-kyverno/">https://nirmata.com/2020/07/30/deny-rules-fine-grained-kubernetes-access-controls-with-kyverno/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-11999749931909774952020-07-30T01:18:00.001+05:302020-07-30T01:18:09.571+05:30How Policy Engines Make Day 2 Easier<p><span style="font-weight: 400;">When we think about policy enforcement, it’s often in the context of ensuring compliance with governance frameworks and compliance laws. When working in Kubernetes, however, it’s slightly more nuanced. In Kubernetes, everything is controlled through configuration, and everything is designed to be tunable. This is what makes Kubernetes so flexible, but it is also what can make it extremely difficult to manage. It also means that policy enforcement has ramifications beyond security and compliance, including things <a href="https://nirmata.com/2020/06/15/what-is-day-2-kubernetes/">like resilience and ability to recover from incidents. </a></span></p>
<p><span style="font-weight: 400;">Policy enforcement in Kubernetes is an essential part of configuration management. Effective policy management is essential for companies to <a href="https://nirmata.com/2020/06/30/preparing-for-kubernetes-day-2-on-day-0/">scale Kubernetes throughout the enterprise</a> and deploy quickly while avoiding Day 2 operations challenges from configuration mistakes. </span></p>
<h2><b>What are Kubernetes policy engines? </b></h2>
<p><span style="font-weight: 400;"><a href="https://nirmata.com/2019/06/03/introducing-kyverno-kubernetes-native-policy-management/">Policy engines</a> are a part of the configuration management story in Kubernetes. They allow organizations to set policies or guardrails around what configurations are allowed, both in general in all deployments as well as in specific types of applications. In addition to establishing guardrails, policy engines can dynamically create configurations or change configurations based on pre-set policies. </span></p>
<p><span style="font-weight: 400;"><a href="https://nirmata.com/2019/07/11/managing-kubernetes-configuration-with-policies/">Kubernetes-native policy engines</a> work specifically with Kubernetes, working with Kubernetes’ declarative syntax and following configuration management best practices. </span></p>
<h2><b>Why do intelligent policy engines matter?</b></h2>
<p><span style="font-weight: 400;">Policy engines can operate on a simple pass/fail basis, scanning a deployment to see what fails the policies — that’s what a typical traditional policy management tool would do. Intelligent policy engines are dynamic, however. They allow users to create if-then-else policies that will dynamically change configurations, or even generate new configuration objects. </span></p>
<p><span style="font-weight: 400;">As a result, configuration can be largely automated. For example, when a new namespace is created, there are dozens of configurations that have to be tuned. With an intelligent policy engine, all of those configurations can be generated automatically every time a namespace is created. </span></p>
<p><span style="font-weight: 400;">In another example, if the policy engine finds configurations that violate the set policy, instead of just alerting the Kubernetes admin the engine will also automatically fix the configuration to bring it into compliance. As a result, policy violations are fixed faster and are less likely to cause problems. </span></p>
<h2><b>How does this relate to Day 2?</b></h2>
<p><span style="font-weight: 400;">The key to a smooth Day 2 is strict adherence to <a href="https://nirmata.com/2020/02/19/10-kubernetes-best-practices-you-can-easily-apply-to-your-clusters/">predetermined best practices</a> during design and development. Given the amount of complexity in Kubernetes, this absolutely requires automation — even the most experienced Kubernetes admins make mistakes when manually managing hundreds of configurations. </span></p>
<p><span style="font-weight: 400;">Here are some specific ways that automating configurations with an intelligent policy engine lead to smoother Day 2 operations. </span></p>
<h3><b>Security</b></h3>
<p><span style="font-weight: 400;">By default, Kubernetes is insecure. Improving Kubernetes’ security posture involves tightly controlling configurations. At the same time, the Kubernetes environment is dynamic, with users constantly making requests or deploying new applications. A policy engine can constantly scan both the development and the production environment to ensure that no pods are running as root users and to check Helm charts for vulnerabilities, among many other things. With automated policy engines, when a problem is detected it is both reported as well as fixed automatically. </span></p>
<h3><b>Resource usage</b></h3>
<p><span style="font-weight: 400;">Organizations can get into trouble with escalating costs if they don’t put limits on resource usage, but leaving it up to each individual developer guarantees that mistakes will happen. Intelligent policy engines allow organizations to decide ahead of time what appropriate resource limits are and ensure those limits are applied uniformly. </span></p>
<h3><b>Monitoring and logging</b></h3>
<p><span style="font-weight: 400;">Monitoring application health is key to ensuring quick recoveries in case of failure, high availability and a positive customer experience. Getting all the information you need from the application in production often requires configuring the monitoring capabilities correctly; a policy engine can ensure that happens. </span></p>
<p><span style="font-weight: 400;">In general, Day 2 operations depend on workloads being configured correctly during the development stage. Especially as Kubernetes expands throughout an organization and the footprint becomes more complex, involving engineers who are non-experts in Kubernetes configuration, handling as much as possible through automation is the only way to get both a quick development velocity as well as uniform configurations that adhere to organizational policies. </span></p>
<h2><b>How Kyverno fits in</b></h2>
<p><span style="font-weight: 400;"><a href="https://kyverno.io">Kyverno</a> is a Kubernetes-native intelligent policy engine that can generate configurations, change them according to policies and/or be used to simply validate configurations. Kyverno creates and enforces policies by creating custom resources and interacting with Kubernetes through the Kubernetes API. This approach ultimately makes the Kyverno policy engine simpler to use, reducing the learning curve and simplifying the experience for users. This in turn both increases adoption in the organization while also reducing the risk of errors. </span></p>
<p><span style="font-weight: 400;">In our experience, the only way for organizations to successfully manage Kubernetes configurations is through policy engines, especially as the Kubernetes footprint expands. Organizations ultimately want to deploy applications as quickly as possible without risking problems on Day 2, and a policy engine is an important tool to make sure configuration errors don’t get in the way of operational success. </span></p>
<p><span style="font-weight: 400;">At the same time, the more automation the policy engine is able to provide, the better. Using a <a href="https://thenewstack.io/kyverno-kubernetes-configuration-via-policy/">tool like Kyverno</a> to not only validate but also generate and mutate configurations to meet the set policies saves developers time while ensuring that applications are secure, cost-effective, resilient and able to recover from incidents. <a href="https://github.com/nirmata/kyverno">Kyverno is open source</a> — try it out here to see how it can simplify configuration management. </span></p>
<br />
<br />
source <a href="https://nirmata.com/2020/07/29/how-policy-engines-make-day-2-easier/">https://nirmata.com/2020/07/29/how-policy-engines-make-day-2-easier/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-45601958792643739582020-07-23T00:18:00.001+05:302020-07-23T00:18:21.198+05:30Managing Day 2 in a Hybrid Cloud Environment<p><span style="font-weight: 400;">A smooth experience with operations in Kubernetes, especially at scale, often comes down to <a href="https://nirmata.com/2020/02/19/10-kubernetes-best-practices-you-can-easily-apply-to-your-clusters/">managing complexity effectively.</a> As application footprints get larger, the complexity explodes, making it challenging — or impossible — to manage manually. This is true even when operating in a single environment. But many organizations want or need to operate in multiple public clouds and/or on a mix of public cloud and on-premises infrastructure. </span></p>
<p> </p>
<p><span style="font-weight: 400;">Containers and Kubernetes make multi-cloud and hybrid cloud strategies possible, but they do not make them easy. Every time you add an environment, the complexity increases. This can easily become an <a href="https://nirmata.com/2020/06/15/what-is-day-2-kubernetes/">unmanageable Day 2 nightmare</a> if organizations don’t but the right tools into place.</span></p>
<p> </p>
<p><span style="font-weight: 400;">Before jumping into the <a href="https://nirmata.com/2020/06/15/what-is-day-2-kubernetes/">specific Day 2 challenges</a> for multi-cloud set-ups, let’s address why organizations might need to operate in many environments. </span></p>
<p> </p>
<p><b>Why we adopt hybrid and multi cloud</b></p>
<p> </p>
<p><span style="font-weight: 400;">There are a number of reasons organizations might need to be in hybrid and multiple clouds. They include:</span></p>
<ul>
<li style="font-weight: 400;"><span style="font-weight: 400;">The ability to fail over to another environment in case of an outage</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">A desire to keep particularly sensitive workloads on-premises while other workloads run in the cloud</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">The ability to leverage the different pricing models at each cloud provider to find the most economical way to run each workload</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">The public cloud providers have different geographical coverage, so some organizations want the ability to route users to the cloud provider with the data center closest to their physical location</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Competitive reasons. Companies like Walmart might not want to store their data with Amazon, whereas Apple might not want to store its data on Azure. If both are your customers, you will need to offer the ability to operate in multiple clouds</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Avoiding lock-in to a particular cloud provider, which can</span> <a href="https://www.lastweekinaws.com/blog/why-zoom-chose-oracle-cloud-over-aws-and-maybe-you-should-too/"><span style="font-weight: 400;">be important during pricing negotiations.</span></a><span style="font-weight: 400;"> </span></li>
</ul>
<p> </p>
<p><span style="font-weight: 400;">These are compelling business reasons, and indeed hybrid and multi-cloud approaches are common. However, they can lead to their own Day 2 challenges, especially if these potential issues aren’t proactively addressed at the design and implementation phase. </span></p>
<p> </p>
<p><b>Avoiding snowflakes</b></p>
<p> </p>
<p><span style="font-weight: 400;">The core challenge when running in multiple environments is getting cross-environment consistency. It’s tempting to think that because it’s all Kubernetes, everything will be the same. But above the Kubernetes control plane, there are still environment-specific differences, including: </span></p>
<p> </p>
<ul>
<li style="font-weight: 400;"><span style="font-weight: 400;">Kubernetes plugins for networking and storage</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Add-on services related to security, monitoring and logging</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Governance policies and best practices</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Resource management and optimization. </span></li>
</ul>
<p> </p>
<p><span style="font-weight: 400;">In addition, each environment will likely have its own dashboard, creating a fragmented experience for both the developers and for the teams responsible for operating the systems. The risk is that each environment can become a sort of snowflake environment, with no coordinated way to ensure organizational consistency. This increases the risk of misconfigurations, makes it more difficult for platform teams to manage centrally, and <a href="https://nirmata.com/2020/07/09/how-to-overcome-the-day-2-kubernetes-skills-gap/">increases the learning curve.</a> As a result, productivity drops and the risks of operational and security incidents increase. It also becomes more difficult to recover from errors, because if every environment is different they are more challenging to troubleshoot. </span></p>
<p><span style="font-weight: 400;">These Day 2 pitfalls are in addition to the challenges organizations often encounter on Day 2 with Kubernetes, even when running in a single environment. If not addressed, they threaten to derail the entire Kubernetes transition. </span></p>
<p> </p>
<p><b>Designing for consistency</b></p>
<p> </p>
<p><span style="font-weight: 400;">The key to success with Kubernetes in a multi-cloud or hybrid cloud set-up is to build consistency into how you manage the application lifecycle, including managing things like configurations and security in a consistent way. There should be a consistency throughout the design, implementation and operations phases — because Day 2 problems don’t happen in isolation but rather as a result of oversights during earlier phases in the application lifecycle. </span></p>
<p> </p>
<p><span style="font-weight: 400;">You won’t be able to change the inherent inconsistencies between environments — each environment will be optimized for that environment, using the storage, networking and operating system that works best. But organizations can and should add in an operational layer to bring management of the different environments into one platform, providing a consistent way to manage deployments and upgrades, to monitor applications from and to manage security. </span></p>
<p> </p>
<p><span style="font-weight: 400;">Using one platform to manage the multiple environments reduces the cognitive load and the learning curve for the platform engineers, while also providing developers with a more seamless experience. The result is not just better operational metrics, but also higher development velocity and better productivity for both development and operations engineers. </span></p>
<p> </p>
<p><span style="font-weight: 400;">In addition to thinking about bringing control over multiple environments together under one platform, organizations also need to think about how their organizational structure promotes consistency — or not. A structure in which one central team is responsible for managing the Kubernetes infrastructure across environments — with the assistance of a management platform — will result in better organizational consistency and ultimately better productivity, availability and security postures. </span></p>
<p> </p>
<p><span style="font-weight: 400;">Day 2 Kubernetes is ultimately about taming management complexity. Multiple environments add complexity to the system, and require organizations to proactively think about ways to bring disparate environments under consistency, central control. A platform like Nirmata brings all the information into one dashboard, making it easier to understand and control. <a href="https://nirmata.com">See how it works now. </a></span></p>
<p> </p>
<br />
<br />
source <a href="https://nirmata.com/2020/07/22/managing-day-2-in-a-hybrid-cloud-environment/">https://nirmata.com/2020/07/22/managing-day-2-in-a-hybrid-cloud-environment/</a>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-88202063971745472742016-04-11T23:01:00.001+05:302016-04-11T23:01:31.718+05:30Can the XSLT 2.0 Tokenize Function be used in SOA 12c<div dir="ltr" style="text-align: left;" trbidi="on">
<h4>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;">Symptoms: </span></span></h4>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;">Does the latest version of Oracle SOA Suite 12c support XSLT 2.0 functions as part of a BPEL transformation?<br /><br />When using the tokenize function an error is reported during deployment.<br /><br />ERROR<br />-----------------------<br />Parse Error in tokenize function<br /><br /> </span></span><br />
<h4 style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;">Cause: </span></span></h4>
<h4>
<span style="font-family: "verdana" , sans-serif;"></span></h4>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"> <br />Bug 6840672 : USAGE OF REPLACE() FUNCTION RESULTS IN XML-22018 PARSE ERROR<br /><br />XPath F&O regex functions matches, replace, and tokenize are missing in XSLT 2.0 implementation.<br /><br />Fixed in XDK 12.2, however no BACKPORT FEASIBL due compatible issues.<br /> </span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<br />
<h4 style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;">Resolution: </span></span></h4>
<h4>
<span style="font-family: "verdana" , sans-serif;"></span></h4>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"><br />The tokenize function is not supported in SOA 12.1.3. <br /><br />You may write a custom XSLT fuctions in Java to implement this functionality.</span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"></span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"></span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"></span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"></span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"><br /></span></span></div>
Anonymoushttp://www.blogger.com/profile/00523918414942076723noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-16418759149311956092016-04-11T22:58:00.004+05:302016-04-11T22:58:59.803+05:30SOA 12c domain creation appears to hang on OPSS schema population<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
<span class="kmContent" id="kmPgTpl:r1:ot71" style="color: black; font-family: Verdana, sans-serif; font-size: x-small;"><div style="text-align: left;">
<h4 style="font-weight: normal; text-align: left;">
<br /></h4>
</div>
</span></h3>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">On : 12.2.1.0.0 version, Install - SOA</span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">While
creating a SOA Domain through the Config Wizard (config.cmd / sh),
domain creation hangs on the OPSS Schema population step and takes a
long time to finish. </span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">Thread dump shows the below stack trace:</span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="kmcodeblock" style="background-color: #e0eaf1; border: 1px solid rgb(196, 209, 230); font-size: 12px; margin: 5px 0px 0px; overflow: auto; padding: 0.5em;">
<span style="font-family: Verdana, sans-serif;">"Thread-22" #83 prio=6 os_prio=0 tid=0x00007fd214833000 nid=0x2786 runnable [0x00007fd20f9f8000]</span><br />
<span style="font-family: Verdana, sans-serif;">java.lang.Thread.State: RUNNABLE</span><br />
<span style="font-family: Verdana, sans-serif;">at java.net.SocketInputStream.socketRead0(Native Method)</span><br />
<span style="font-family: Verdana, sans-serif;">at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)</span><br />
<span style="font-family: Verdana, sans-serif;">at java.net.SocketInputStream.read(SocketInputStream.java:170)</span><br />
<span style="font-family: Verdana, sans-serif;">at java.net.SocketInputStream.read(SocketInputStream.java:141)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.net.ns.Packet.receive(Packet.java:311)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.net.ns.DataPacket.receive(DataPacket.java:105)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:305)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.net.ns.NetInputStream.read(NetInputStream.java:249)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.net.ns.NetInputStream.read(NetInputStream.java:171)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.net.ns.NetInputStream.read(NetInputStream.java:89)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:123)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:79)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.T4CMAREngineStream.unmarshalUB1(T4CMAREngineStream.java:429)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:397)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.T4C7Ocommoncall.doOCOMMIT(T4C7Ocommoncall.java:73)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.T4CConnection.doCommit(T4CConnection.java:910)</span><br />
<span style="font-family: Verdana, sans-serif;">- locked <0x00000000c74ad780> (a oracle.jdbc.driver.T4CConnection)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:2401)</span><br />
<span style="font-family: Verdana, sans-serif;">- locked <0x00000000c74ad780> (a oracle.jdbc.driver.T4CConnection)</span><br />
<span style="font-family: Verdana, sans-serif;">at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:2407)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicCommitTransaction(DatabaseAccessor.java:439)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.commitTransaction(DatasourceAccessor.java:405)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.commitTransaction(DatabaseAccessor.java:429)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.sessions.AbstractSession.basicCommitTransaction(AbstractSession.java:814)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.sessions.server.ClientSession.basicCommitTransaction(ClientSession.java:182)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.sessions.AbstractSession.commitTransaction(AbstractSession.java:1018)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransaction(UnitOfWorkImpl.java:1600)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitTransaction(RepeatableWriteUnitOfWork.java:650)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1615)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:285)</span><br />
<span style="font-family: Verdana, sans-serif;">at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169)</span><br />
<span style="font-family: Verdana, sans-serif;">...
</span></div>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<h4 style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">Solution</span></h4>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">Issue is on the database. Configuration Wizard trace shows the call just waits for DB to respond.</span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;">Starting in 12c, SOA needs JPS to be on database. During domain
creation the config wizard will populate the OPSS schema and this takes
some time to finish. Usually it will complete in a min or 2 and you
usually see the trace as above. </span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
</div>
Anonymoushttp://www.blogger.com/profile/00523918414942076723noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-67223311946151262732016-04-11T22:49:00.006+05:302016-04-11T22:49:57.677+05:30Can the XSLT 2.0 Tokenize Function be used in SOA 12c<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<h4 style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;">Symptoms</span></h4>
<span style="font-family: "verdana" , sans-serif;">Does the latest version of Oracle SOA Suite 12c support XSLT 2.0 functions as part of a BPEL transformation?</span><span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">When using the tokenize function an error is reported during deployment.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<h4 style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;">ERROR</span></h4>
<span style="font-family: "verdana" , sans-serif;">Parse Error in tokenize function</span><span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;"><br /></span><h4 style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;">Cause</span></h4>
<span style="font-family: "verdana" , sans-serif;">Bug 6840672 : USAGE OF REPLACE() FUNCTION RESULTS IN XML-22018 PARSE ERROR</span><span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">XPath F&O regex functions matches, replace, and tokenize are missing in XSLT 2.0 implementation.</span><span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">Fixed in XDK 12.2, however no BACKPORT FEASIBL due compatible issues.</span><span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">Solution<br /> </span><span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">The tokenize function is not supported in SOA 12.1.3.<br /> </span><span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">You may write a custom XSLT fuctions in Java to implement this functionality.</span><br />
<span style="font-family: "verdana" , sans-serif;"> </span></div>
Anonymoushttp://www.blogger.com/profile/00523918414942076723noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-53491614844701925892016-04-11T14:53:00.000+05:302016-04-11T15:01:47.164+05:30Is there Documentation for SOA 12c Integration With "API Gateway"?<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;">Problem:</span></span><span style="font-family: "verdana" , sans-serif;"></span></h4>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;">There is a plan to upgrade SOA from 11.1.1.7 to 12c, and currently SOA is integrated with API Gateway. Is there information/documents related to the integration between SOA and API Gateway that will be impacted by the upgrade?<br /> </span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<br />
<h4 style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;">Resolution: </span></span></h4>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;">There is no intergration guide for OAG/SOA as such. But there is significant impact when upgrading SOA from 11.1.1.7 to 12c in case OWSM policies are used to secure any SOA service<br />to which OAG connects.<br /><br />Oracle API Gateway 11.1.2.4.0 and earlier bundled policies for integration with OWSM are not certified with OWSM 12c. They are only certified with OWSM 11g policies.<br />Certification of OAG with OWSM 12c policies is planned for a future release.</span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"></span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"></span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"></span></span><br />
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: small;"><br /></span></span></div>
Anonymoushttp://www.blogger.com/profile/00523918414942076723noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-27169641532875849712016-04-10T23:50:00.001+05:302016-04-10T23:50:47.422+05:30SOA 12c EJB timeout values<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
<span style="font-family: Verdana,sans-serif;"></span><span style="font-family: Verdana,sans-serif;"><span style="font-size: small;">Problem:</span></span><span style="font-family: Verdana,sans-serif;"></span><span style="font-family: Verdana,sans-serif;"></span></h4>
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;">In 11g it was recommended to tune the following in concert to extend BPEL timeouts (in addition to the SyncMaxWaitTime and JTA timeout): <br /><br />BPELActivityManagerBean<br />BPELDeliveryBean<br />BPELDispatcherBean<br />BPELEngineBean<br />BPELFinderBean<br />BPELInstanceManagerBean<br />BPELProcessManagerBean<br />BPELSensorValuesBean<br />BPELServerManagerBean<br /><br />In 12c there are 4 additional EJBs: <br /><br />BPELCacheRegistryBean<br />BPELCacheStoreBean<br />BPELClusterBean<br />BPELKeyGeneratorBean<br /><br />Do they need to be tuned as well?</span></span><br />
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br /></span></span>
<h4>
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;">Resolution:</span></span></h4>
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;">No, it is not necessary to increase the timeout values for the new beans in sync with the old ones </span></span><br />
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br /></span></span></div>
Anonymoushttp://www.blogger.com/profile/00523918414942076723noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-3714486324533276162016-04-10T23:43:00.001+05:302016-04-10T23:43:53.120+05:30How to purge the ORASDPM schema in SOA 12c<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span class="kmContent" id="kmPgTpl:r1:ot71" style="color: black;">Problem:</span><span class="kmContent" id="kmPgTpl:r1:ot71" style="color: black;"></span><span class="kmContent" id="kmPgTpl:r1:ot71" style="color: black;"> </span></span></span></h4>
<div style="text-align: left;">
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;">Document 1287036.1 (Purging ORASDPM Schema On SOA 11g) provides the steps to purge the ORASDPM schema in SOA 11g but how can it be accomplished in 12c?</span></span></div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span class="kmContent" id="kmPgTpl:r1:ot71" style="color: black;">Resolution: </span></span></span></h4>
<div style="text-align: left;">
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;">The Auto Purge process in 12c does not purge the ORASDPM schema.</span></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-family: Verdana,sans-serif;"><span style="font-size: small;">However, in 12c it is not 'ORASDPM' but has changed to 'UMS'.<br /><br />The Only Change is instead of <Instance_Name>_ORASDPM, in 12c it is <Instance_Name>_UMS.</span></span></div>
</div>
Anonymoushttp://www.blogger.com/profile/00523918414942076723noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-89451942799616476392016-03-22T23:33:00.000+05:302016-03-22T23:34:29.372+05:30Solved Oracle Jdevelper 12.1.3 Quick install missing SOA Suite Tiers<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
After installing Oracle jdeveloper 12.1.3 Quick Install successfully, one can't able to find SOA Tiers to create SOA & BPM applications. I solved this problem by simply updating the Oracle jdevelper as below :<br />
<br />
1) Click <b>Help</b>><b>Check for Updates</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrRtYqw_WayvTYuzP_Rk_k6xm9zfvgclf0eg78k3Ey6kBX-6DeipTjDwAZHzEjPPRI9RWkqPlsopdGC2v43OPMfiD81ionv43gw3g9MMfrIFkjm5Ps0rkd_PadETZuNS4-xmRtPdBCfvI/s1600/1.+check+for+updates.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrRtYqw_WayvTYuzP_Rk_k6xm9zfvgclf0eg78k3Ey6kBX-6DeipTjDwAZHzEjPPRI9RWkqPlsopdGC2v43OPMfiD81ionv43gw3g9MMfrIFkjm5Ps0rkd_PadETZuNS4-xmRtPdBCfvI/s400/1.+check+for+updates.jpg" width="327" /></a></div>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<br />
<b><br /></b>
<br />
<a name='more'></a><br /><br />
<br />
2) Leave <b>Search Update Centers </b>default and click <b>Next></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitnd-Z5254LETgjU4wgmqVCBx1FevRHH5xI_JasX1E7fJscRnI7WF6rtqCsfa4dHcxFmiaooaYY85bnUrnVhdpCn5N2PlueQR-g5P-omql24bR_U5BpBAi81L0iJaqaFRAcDGE5h02XZo/s1600/Screenshot.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitnd-Z5254LETgjU4wgmqVCBx1FevRHH5xI_JasX1E7fJscRnI7WF6rtqCsfa4dHcxFmiaooaYY85bnUrnVhdpCn5N2PlueQR-g5P-omql24bR_U5BpBAi81L0iJaqaFRAcDGE5h02XZo/s640/Screenshot.jpg" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
3) <span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;">Check '<b>Spring & Oracle Weblogic SCA</b>' and click <b>Nex</b>t:</span><br />
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBJ9aufsDP8U6Jr7p0hr6S3M3Fj6T0yzim2n3uT6uUWXtRl2AT-e8zT_SIYkLJT6HlO4xTy_HojDhge3f3gFrZBPL1kU8jZIeDGPestZw5tglDOiaLXiiGQX0NYIfDKVrpu1H-BGpuNXI/s1600/Screenshot-Check+for+Updates+-+Step+2+of+4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBJ9aufsDP8U6Jr7p0hr6S3M3Fj6T0yzim2n3uT6uUWXtRl2AT-e8zT_SIYkLJT6HlO4xTy_HojDhge3f3gFrZBPL1kU8jZIeDGPestZw5tglDOiaLXiiGQX0NYIfDKVrpu1H-BGpuNXI/s640/Screenshot-Check+for+Updates+-+Step+2+of+4.png" width="640" /></a></div>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<br />
<br />
4) Click <b>Finish</b> and <b>restart</b> jdeveloper .<br />
<br />
Now you can find SOA Application in the New Gallery as below.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-A-aQbiGpcWRXQZRok15-AsLwJA-lGHDkIYaY5NekwRpnBVrs9S2h65rK-HSVGd_Pi0dXwojYXzzJ7sgac-mecMdWo40SWDpGHv_uVactSZnpp9A6EkuOvm6X0RyJ7VWo8mnGb2oX0T0/s1600/Screenshot001.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-A-aQbiGpcWRXQZRok15-AsLwJA-lGHDkIYaY5NekwRpnBVrs9S2h65rK-HSVGd_Pi0dXwojYXzzJ7sgac-mecMdWo40SWDpGHv_uVactSZnpp9A6EkuOvm6X0RyJ7VWo8mnGb2oX0T0/s640/Screenshot001.jpg" width="640" /></a></div>
<br />
<br />
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;">Thanks :)</span><br />
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span>
<span style="background-color: white; font-family: "tahoma" , sans-serif; font-size: 13px; line-height: 16px;"><br /></span></div>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com1tag:blogger.com,1999:blog-4135016378492662719.post-46747145173647294652016-01-31T10:08:00.000+05:302016-01-31T10:49:39.054+05:30Oracle WebLogic Server 12c: Configuring a JDBC Data Source<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 class="obe_title" style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; margin-bottom: 1px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<a href="https://www.blogger.com/null" id="t1" name="t1" style="font-size: 12pt; font-style: italic;">Setting Up the Schema in the Oracle Database</a></h1>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
To set up the database schema required by the JDBC client application, perform the following steps:</div>
<table border="0" cellpadding="1" cellspacing="0" style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; width: 650px; word-spacing: 0px;"><tbody>
<tr valign="top"><th width="25">1.</th><td>Download the<span class="Apple-converted-space"> </span><a href="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/files/jdbc_obe.zip">jdbc_obe.zip</a><span class="Apple-converted-space"> </span>file to the machine where your WebLogic Server domain and servers are. Extract the file contents to a local drive. In this tutorial, the files are extracted into the <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">/home/oracle/jdbcobe/testds</span> directory.<br />
The zip file contains three files:<br />
<ul style="list-style-type: none; margin: 0px 0px 0px 0.6em; padding: 0px;">
<li style="background-image: url(http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/library/bullet.gif); background-position: 0px 0.3em; background-repeat: no-repeat; padding-left: 1.1em;"><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">testds_oracle.sql</span><span class="Apple-converted-space"> </span><br />A SQL script to configure the required schema in the Oracle Database</li>
<li style="background-image: url(http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/library/bullet.gif); background-position: 0px 0.3em; background-repeat: no-repeat; padding-left: 1.1em;"><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">testds.war</span><span class="Apple-converted-space"> </span><br />A simple web application used to test the configured data source</li>
<li style="background-image: url(http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/library/bullet.gif); background-position: 0px 0.3em; background-repeat: no-repeat; padding-left: 1.1em;"><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">deploy_testds.py</span><span class="Apple-converted-space"> </span><br />A WebLogic Scripting Tool (WLST) script used to deploy the web application</li>
</ul>
</td></tr>
<tr valign="top"><th width="25">2.</th><td>Log in to the system as the user that started the Oracle Database. Open a Terminal window and navigate to the location of the SQL script file, <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">testds_oracle.sql</span>. n this tutorial that is:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">cd /home/oracle/jdbcobe/testds</span><br />
Make sure that the database environment variables are set by printing them out:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">echo $ORACLE_HOME</span><span class="Apple-converted-space"> </span><br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">/u01/app/oracle/product/11.2.0/xe</span><span class="Apple-converted-space"> </span><br />
<a href="https://www.blogger.com/null" name="more"></a><br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">echo $ORACLE_SID</span><span class="Apple-converted-space"> </span><br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">XE</span><span class="Apple-converted-space"> </span><br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;"></span><br />
Note: The values of your environment variables may be different. If there are no values printed, then set the variables to the proper values with:<br />
<a name='more'></a><br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">export ORACLE_HOME=<i>valid_value</i></span><span class="Apple-converted-space"> </span><br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">export ORACLE_SID=<i>valid_value</i></span><br />
Then invoke SQL Plus as the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">sysdba</span><span class="Apple-converted-space"> </span>user:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">$ORACLE_HOME/bin/sqlplus / as sysdba</span><br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t100-startsqlplus.gif" height="183" id="t100-startsqlplus" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">3.</th><td>Connect to the database as the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">system</span><span class="Apple-converted-space"> </span>user. You can give the password and the name of the database as you connect. In this tutorial the command is:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">SQL></span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">connect system/oracle@XE</span><br />
Then run the SQL script with this command:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">SQL></span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">@testds_oracle.sql</span><br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t101-runsqlscript.gif" height="135" id="t101-runsqlscript" style="border: 1px solid rgb(0, 0, 0);" width="400" /><br />
<br />
The script,<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">testds_oracle.sql</span>, creates a user called<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">PBPUBLIC</span><span class="Apple-converted-space"> </span>with the password<span class="Apple-converted-space"> </span> <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">PBPUBLIC</span>. It grants that user the abilities to create sessions, tables, and so on. It then connects to the database as that user and creates three tables: <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;"> </span><br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">EMPLOYEE</span>,<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">WLS_CATALOG_ITEMS</span>, and<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">WLS_CLIENT_INFO</span>. Finally, it inserts rows into those tables and exits.</td></tr>
</tbody></table>
<h2 class="obe_topic" style="-webkit-text-stroke-width: 0px; background-color: white; color: #336699; font-family: arial, helvetica, sans-serif; font-size: 12pt; font-style: italic; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; margin-bottom: 1px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<a href="https://www.blogger.com/null" id="t2" name="t2">Starting WebLogic Server</a></h2>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
To start the administration server and the dizzy1 managed server of the domain, perform the following steps:</div>
<table border="0" cellpadding="1" cellspacing="0" style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; width: 650px; word-spacing: 0px;"><tbody>
<tr valign="top"><th width="25">1.</th><td>If the administration server of the domain is not already running, it needs to be started. To start it, in a Terminal window, navigate to the domain directory, and enter the command:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">./startWebLogic.sh</span><br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t200-startweblogic.gif" id="t200-startweblogic" style="border: 1px solid rgb(0, 0, 0);" /><br />
<br />
When prompted for a<span class="Apple-converted-space"> </span><b>username</b><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><b>password</b>, enter the credentials of the domain administrator.</td></tr>
<tr valign="top"><th width="25">2.</th><td>The managed server dizzy1 should also be running. If it is not already running, start it. In another Terminal window, navigate to the domain directory, then <span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">cd</span> into the <span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">bin</span> subdirectory. Enter the command:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">./startManagedWebLogic.sh dizzy1 http://host01.example.com:8001</span><br />
This runs the script to start the managed server named<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">dizzy1</span>. Also notice the argument that gives the URL of the domain's administration server:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">http://host01.example.com:8001</span>.<br />
Note: Use the host name and port of the administration server of your domain.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t201-startmanaged.gif" height="36" id="t201-startmanaged" style="border: 1px solid rgb(0, 0, 0);" width="400" /><br />
<br />
When prompted for a<span class="Apple-converted-space"> </span><b>username</b><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><b>password</b>, enter the credentials of the domain administrator.</td></tr>
</tbody></table>
<h2 class="obe_topic" style="-webkit-text-stroke-width: 0px; background-color: white; color: #336699; font-family: arial, helvetica, sans-serif; font-size: 12pt; font-style: italic; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; margin-bottom: 1px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<a href="https://www.blogger.com/null" id="t3" name="t3">Configuring a JDBC Data Source</a></h2>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
To configure a JDBC data source by using the WebLogic Server administration console, perform the following steps:</div>
<table border="0" cellpadding="1" cellspacing="0" style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; width: 650px; word-spacing: 0px;"><tbody>
<tr valign="top"><th width="25">1.</th><td>After the servers are up and running, access the WebLogic Server administration console. Open a web browser and enter its URL:<br />
<span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">http://<i>hostname</i>:<i>port</i>/console</span><br />
In this tutorial, that is:<span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">http://host01.example.com:8001/console </span>Note: Use the host name and port of the administration server of your domain. On the Welcome screen, log in using the <b>Username</b> and <b>Password</b> entered to start the servers.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t300-adminconsole.gif" height="345" id="t300-adminconsole" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">2.</th><td>Creating a data source is a change to the domain's configuration, so the configuration must first be locked. In the Change Center, click the <b>Lock & Edit</b> button.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t301-lock.gif" id="t301-lock" style="border: 1px solid rgb(0, 0, 0);" /></td></tr>
<tr valign="top"><th width="25">3.</th><td>In the administration console under Domain Structure, expand<span class="Apple-converted-space"> </span><b>Services</b><span class="Apple-converted-space"> </span>(by clicking the<span class="Apple-converted-space"> </span><b> </b><b>+</b> next to it). Then click <b>Data Sources</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t302-clickdatasource.gif" id="t302-clickdatasource" style="border: 1px solid rgb(0, 0, 0);" /></td></tr>
<tr valign="top"><th width="25">4.</th><td>On the right, notice that the Summary of JDBC Data Sources section appears. Under the Data Sources table heading, click the <b>New</b> drop-down list. Then select <b> </b><b>Generic Data Source</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t303-new.gif" id="t303-new" style="border: 1px solid rgb(0, 0, 0);" /></td></tr>
<tr valign="top"><th width="25">5.</th><td>On the first page of the Create a New JDBC Data Source wizard, enter the<span class="Apple-converted-space"> </span><b>Name</b><span class="Apple-converted-space"> </span>of the data source as<span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">dizzyworldDS</span>. Enter the <b>JNDI Name</b> of the data source as <span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">dizzyworldDS</span>. Note: There is no requirement that the data source name and the JNDI name match. The JNDI name is the one to make note of, because it is used by JDBC clients to access the data source. Use the <b>Database Type</b> drop-down list to select <span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">Oracle</span>.<br />
Then click<span class="Apple-converted-space"> </span><b>Next</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t304-dsname.gif" height="400" id="t304-dsname" style="border: 1px solid rgb(0, 0, 0);" width="333" /></td></tr>
<tr valign="top"><th width="25">6.</th><td>On the second page of the wizard, use the<span class="Apple-converted-space"> </span><b>Database Driver</b><span class="Apple-converted-space"> </span>drop-down list to select<span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">*Oracle's Driver (Thin) for Instance connections; Versions:9.0.1 and later</span>. Then click <b>Next</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t305-driver.gif" height="261" id="t305-driver" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">7.</th><td>On the next page of the wizard, keep all the default Transaction Options, and click<span class="Apple-converted-space"> </span><b>Next</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t306-trxopts.gif" height="400" id="t306-trxopts" style="border: 1px solid rgb(0, 0, 0);" width="360" /></td></tr>
<tr valign="top"><th width="25">8.</th><td>On the next page of the wizard, enter the<span class="Apple-converted-space"> </span><b>Database Name</b>. In this tutorial it is<span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">XE</span>. Your database name may be diffrerent. Enter the <b>Host Name</b> of the dizzy1 managed server. In this tutorial it is <span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">host01.example.com</span>.<br />
Use the host name where your dizzy1 server resides. Leave the database <b>Port</b> at the default of <span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">1521</span>. (Unless it is different for your database.) Enter the <b>Database User Name</b> of <span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">PBPUBLIC</span>. This is the user that was created by the<br />
SQL script. Enter the database user's password twice, in the <b>Password</b> and <b>Confirm Password</b> fields.<br />
The password is<span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">PBPUBLIC</span>. Then click <b>Next</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t307-dbinfo.gif" height="400" id="t307-dbinfo" style="border: 1px solid rgb(0, 0, 0);" width="314" /></td></tr>
<tr valign="top"><th width="25">9.</th><td>On the next page of the wizard, click the<span class="Apple-converted-space"> </span><b>Test Configuration</b><span class="Apple-converted-space"> </span>button to check if a connection to the Database can be made, based upon the information entered.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t308-testconfig.gif" height="110" id="t308-testconfig" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">10.</th><td>If the message "Connection test succeeded" is displayed, click<span class="Apple-converted-space"> </span><b>Next</b>.<br />
If the connection test fails, use the<span class="Apple-converted-space"> </span><b>Back</b><span class="Apple-converted-space"> </span>button to review the entries made for the data source and correct any errors. If there are no errors in the entries and the test still fails, make sure your database is running.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t309-success.gif" height="154" id="t309-success" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">11.</th><td>On the last page of the wizard, the data source is targeted. Targeting a data source to a server means that the server will manage that data source and it will be available as one of the resources of that server.<br />
Select the check box next to<span class="Apple-converted-space"> </span><b>dizzy1</b>. Then click <b>Finish</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t310-target.gif" height="267" id="t310-target" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">12.</th><td>In the Summary of JDBC Data Sources area, in the Data Sources table, the new data source,<span class="Apple-converted-space"> </span><b> </b><b>dizzyworldDS</b>, is listed.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t311-dscreated.gif" height="349" id="t311-dscreated" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">13.</th><td>To modify the configuration of the new data source, click its name,<span class="Apple-converted-space"> </span><b>dizzyworldDS</b>, in the table. <img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t312-clickname.gif" height="132" id="t312-clickname" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">14.</th><td>Under the Settings for dizzyworldDS, click the<span class="Apple-converted-space"> </span><b>Connection Pool</b><span class="Apple-converted-space"> </span>tab under the<span class="Apple-converted-space"> </span><b>Configuration</b><span class="Apple-converted-space"> </span>tab.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t313-configpooltab.gif" height="77" id="t313-configpooltab" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">15.</th><td>Scroll down to find the "capacity" fields.<br />
For<span class="Apple-converted-space"> </span><b>Initial Capacity</b><span class="Apple-converted-space"> </span>enter<span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">2</span>.<br />
For<span class="Apple-converted-space"> </span><b>Maximum Capacity</b><span class="Apple-converted-space"> </span>enter<span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">10</span>.<br />
For<span class="Apple-converted-space"> </span><b>Minimum Capacity</b><span class="Apple-converted-space"> </span>enter<span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">2</span>.<br />
Then click<span class="Apple-converted-space"> </span><b>Save</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t314-capacity.gif" height="315" id="t314-capacity" style="border: 1px solid rgb(0, 0, 0);" width="400" /><br />
<br />
The message "Settings updated successfully" is displayed.</td></tr>
<tr valign="top"><th width="25">16.</th><td>In the Change Center click the<span class="Apple-converted-space"> </span><b>Activate Changes</b><span class="Apple-converted-space"> </span>button.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t315-activate.gif" id="t315-activate" style="border: 1px solid rgb(0, 0, 0);" /><br />
<br />
The message "All changes have been activated. No restarts are necessary." is displayed.</td></tr>
<tr valign="top"><th width="25">17.</th><td>Under Domain Structure, expand<span class="Apple-converted-space"> </span><b>Environment</b><span class="Apple-converted-space"> </span>and then click<span class="Apple-converted-space"> </span><b>Servers</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t316-clickservers.gif" id="t316-clickservers" style="border: 1px solid rgb(0, 0, 0);" /></td></tr>
<tr valign="top"><th width="25">18.</th><td>In the Servers table, click the server<span class="Apple-converted-space"> </span><b>dizzy1</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t317-clickdizzy1.gif" id="t317-clickdizzy1" style="border: 1px solid rgb(0, 0, 0);" /></td></tr>
<tr valign="top"><th width="25">19.</th><td>In the Settings for dizzy1, under the<span class="Apple-converted-space"> </span><b>Configuration</b><span class="Apple-converted-space"> </span>tab and the<span class="Apple-converted-space"> </span><b>General</b><span class="Apple-converted-space"> </span>subtab, click the<br />
link<span class="Apple-converted-space"> </span><b>View JNDI Tree</b>.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t318-viewjndi.gif" height="260" id="t318-viewjndi" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">20.</th><td>The JNDI tree opens in a new browser window (or tab). Notice that<span class="Apple-converted-space"> </span><b>dizzyworldDS</b><span class="Apple-converted-space"> </span>appears in the JNDI tree.<br />
Note: Other entries in the JNDI tree of your server can be very different from what is shown here. It all depends upon what resources your server has.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t319-jnditree.gif" id="t319-jnditree" style="border: 1px solid rgb(0, 0, 0);" /></td></tr>
</tbody></table>
<h2 class="obe_topic" style="-webkit-text-stroke-width: 0px; background-color: white; color: #336699; font-family: arial, helvetica, sans-serif; font-size: 12pt; font-style: italic; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: normal; margin-bottom: 1px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<a href="https://www.blogger.com/null" id="t4" name="t4">Testing the JDBC Data Source</a></h2>
<div style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
To test the JDBC data source with a simple web application, perform the following steps:</div>
<table border="0" cellpadding="1" cellspacing="0" style="-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; width: 650px; word-spacing: 0px;"><tbody>
<tr valign="top"><th width="25">1.</th><td>Open a new Terminal window and navigate to the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">/server/bin</span><span class="Apple-converted-space"> </span>directory under the WebLogic installation directory. In this tutorial, that is: <span style="font-family: 'courier new', courier, mono;">/u01/app/oracle/Middleware/wlserver_12.1/server/bin</span><br />
Then run the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">setWLSEnv.sh</span><span class="Apple-converted-space"> </span>script as follows:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">source setWLSEnv.sh</span><br />
This will set the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">PATH</span><span class="Apple-converted-space"> </span>and the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">CLASSPATH</span><span class="Apple-converted-space"> </span>so the WLST deployment script can be executed.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t400-setenviro.gif" height="335" id="t400-setenviro" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">2.</th><td>Next navigate to the directory where the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">testds.war</span><span class="Apple-converted-space"> </span>file resides. This file was part of the zip file extracted earlier. In this tutorial, the zip file was extracted into the <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">/home/oracle/jdbcobe/testds</span> directory.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t401-cdtestds.gif" id="t401-cdtestds" style="border: 1px solid rgb(0, 0, 0);" /></td></tr>
<tr valign="top"><th width="25">3.</th><td>Before running the supplied WLST script,<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">deploy_testds.py</span>, you may need to edit it. The first line of the script uses the <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">connect()</span> command. The first argument of that command is the domain administrator's username, the second argument is that user's password, and the third argument is the host and port of the administration server of the domain. Make sure the values for these arguments are correct for your domain before running this script.<br />
Make any changes required to the script, and save the file.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t401a-script.gif" height="91" id="t401a-script" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">4.</th><td>Run the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">deploy_testds.py</span><span class="Apple-converted-space"> </span>script to deploy the web application in the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">testds.war</span><span class="Apple-converted-space"> </span>file and target it to the <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">dizzy1</span><span class="Apple-converted-space"> </span>server. Do this by entering the following command:<br />
<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">$</span><span class="Apple-converted-space"> </span><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">java weblogic.WLST deploy_testds.py</span><br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t402-wlst.gif" height="400" id="t402-wlst" style="border: 1px solid rgb(0, 0, 0);" width="340" /><br />
<br />
You should see a message that the deploy operation has succeeded. Note: You can ignore the warning about <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">Context.close()</span>. That warning is always displayed when running a WLST script and is not an issue.<br />
<br /></td></tr>
<tr valign="top"><th width="25">5.</th><td>To verify the deployment was successful, go the the administration console, and under Domain Structure, click<b>Deployments</b>. Then in the Deployments table, find<span class="Apple-converted-space"> </span><b>TestDS</b><span class="Apple-converted-space"> </span>with the "Active" State.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t403-deployed.gif" height="177" id="t403-deployed" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">6.</th><td>To use the deployed application, in another web browser, enter the host and port for the dizzy1 managed server, followed by <span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">/testds</span>. In this tutorial, the URL entered is: <span style="font-family: 'courier new', courier, mono; font-weight: bold;">http://host01.example.com:8003/testds</span><br />
When the application comes up, enter the following:<br />
<table border="0"><tbody>
<tr><td><b>Data Source Name</b>: </td><td><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">dizzyworldDS</span></td></tr>
<tr><td><b>Table Name</b>:</td><td><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">EMPLOYEE</span></td></tr>
<tr><td><b>Username</b>:</td><td><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">weblogic</span><span class="Apple-converted-space"> </span>(use your domain administrator's username)</td></tr>
<tr><td><b>Password</b>:</td><td><span class="obe_code_enter" style="font-family: "courier new" , "courier" , "mono"; font-weight: bold;">Welcome1</span>. (use your domain administrator's password)</td></tr>
</tbody></table>
Then click the<span class="Apple-converted-space"> </span><b>Test Data Source</b><span class="Apple-converted-space"> </span>button.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t404-app.gif" height="246" id="t404-app" style="border: 1px solid rgb(0, 0, 0);" width="400" /></td></tr>
<tr valign="top"><th width="25">7.</th><td>The rows in the<span class="Apple-converted-space"> </span><span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">EMPLOYEE</span><span class="Apple-converted-space"> </span>table are displayed below the fields.<br />
<img alt="Screenshot for Step" class="imgborder_on" src="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/04-ConfigDataSource/images/t405-employees.gif" height="362" id="t405-employees" style="border: 1px solid rgb(0, 0, 0);" width="400" /><br />
<br />
The application uses the<span class="Apple-converted-space"> </span><b>Data Source Name</b><span class="Apple-converted-space"> </span>entered (<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">dizzyworldDS</span>) as the JNDI name to look up the data source from dizzy1, retrieves a database connection from that data source, and executes the SQL to select all the rows in the table entered in the <b>Table Name</b> field (<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">EMPLOYEE</span>). If you want to test the data source again, try a different table in the <b>Table Name</b> field. The other two tables are<span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">WLS_CATALOG_ITEMS</span> and <span class="obe_code_element" style="font-family: "courier new" , "courier" , "mono"; font-weight: normal;">WLS_CLIENT_INFO</span>.</td></tr>
</tbody></table>
</div>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-27410602106874847802016-01-31T01:45:00.001+05:302016-01-31T09:40:18.276+05:30Shell Script for Monitoring all Unix Servers running<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
How to automate Unix servers performance monitoring and send report ? How to achieve same if you have numerous fixed flavor of servers like Linux, SunOS, AIX etc with single script.<br />
<br />
SO, here I'm going to share you the shell script whose job is to send email report of all servers ( Linux and Solaris ) running. This script will first do ping test first after succeed gather rest of details one by one. This shell monitoring script will calculate CPU utilization (CPU 5 min , 1- min , 15 min load, CPU usr , CPU sys and Total number of Processes running ) , Memory utilization ( Total RAM, used RAM, free RAM, Total Swap, used Swap , free Swap) and the disk utilization of each servers of which you only need to watch. one great capability of this shell script is to customize disk utilization monitoring of only location/path you are interested.<br />
<br />
<u>The report email send will be in below format:</u><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqXayUn42vnLNfBFiLl7giLb36QPnMrrJDQ3NIzUoE1gE9OiLg7x1nrIUq5SR34gbdg4pgePznaNQReUobUE35uqmCYuHrcmYTm5d49g5z9KFUFc4wIZjGlwoV5xOha7Hxk2yg2M8Q2qQ/s1600/Screenshot.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Report email" border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqXayUn42vnLNfBFiLl7giLb36QPnMrrJDQ3NIzUoE1gE9OiLg7x1nrIUq5SR34gbdg4pgePznaNQReUobUE35uqmCYuHrcmYTm5d49g5z9KFUFc4wIZjGlwoV5xOha7Hxk2yg2M8Q2qQ/s640/Screenshot.jpg" title="Report email" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Report Email</td></tr>
</tbody></table>
<br />
<a name='more'></a><br />
<br />
<b>How to run the script ?</b><br />
<b><br /></b>
We only need one exception file and one shell script file in the same execution directory. Suppose you only interested in some specific path or directory to be get monitor then you have to put the path of location for which you don't need monitoring. <u><b><i>To get data reports from all servers one needs to setup password less ssh key on all servers.</i></b></u><br />
<br />
<u>Exception File (<b>exception.txt</b>) format will be like this : (not interested in monitoring path)</u><br />
<br /></div>
<div class="kmcodeblock" style="background-color: #e0eaf1; border: 1px solid rgb(196, 209, 230); font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 5px 0px 0px; overflow: auto; padding: 0.5em;">
/etc/svc/volatile
<br />
/system/object
<br />
/etc/mnttab
<br />
/system/contract
<br />
/proc
/unicenter
<br />
/var/run
<br />
/tmp
<br />
/dev/fd
</div>
</div>
<br />
<u>monitoring_script.sh</u><br />
<br />
This Unix Server Monitoring Shell Script only for your reference and it can be modified and optimize with other commands available. This script is tested in different environments and it's working. It may need some modification to run in your environment.<br />
<u><br /></u>
<br />
<div class="kmcodeblock" style="background-color: #e0eaf1; border: 1px solid rgb(196, 209, 230); font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 5px 0px 0px; overflow: auto; padding: 0.5em;">
#!/bin/bash<br />
<br />
initVar() {<br />
#List Of hosts to be monitored<br />
export Q_HOST="abc.middlewaretimes.com xyz.middlewaretimes.com mole.middlewaretimes.com mule.middlewaretimes.com"<br />
<br />
# SSH USER<br />
export USR="u5355680"<br />
<br />
# -- Show warning if server load average is below the limit for last 5 minute<br />
export LOAD_WARN=15.0 #####CPU Load More than<br />
export MEM_WARN=1 ###### Memory Less than 1Gb<br />
export SWAP_WARN=90 ######### SWAP more than 90%<br />
<br />
#export NETVAL=30 ########check after 30sec if a machine is down<br />
export LOGDEST="/home/u5355680/sysRun.log" ###Log Dest<br />
export MFILE=/home/u5355680/info.html<br />
export MYNETINFO="System Info for Mobistar Servers"<br />
<br />
####MAIL####<br />
export TOLIST="u5355680@mail.middlewaretimes.be"<br />
export FROM="u5355680@mail.middlewaretimes.be"<br />
export SUB="Status of middlewaretimes Servers"<br />
<br />
# font colours<br />
export GREEN='<font color="#008000">'<br />
export RED='<font color="#ff0000">'<br />
export NOC='</font>'<br />
export LSTART='<ul><li>'<br />
export LEND='</li></ul>'<br />
<br />
# Local path to ssh and other bins<br />
export SSH="/usr/bin/ssh"<br />
export PING="/bin/ping"<br />
export NOW="$(date)"<br />
<br />
<br />
echo "started lookup @ $NOW" > "$LOGDEST"<br />
echo "server lookup list $Q_HOST" >> "$LOGDEST"<br />
<br />
#################### FS INIT #############<br />
WORKFILE="df.work" # Holds filesystem data<br />
>$WORKFILE # Initialize to empty<br />
THISHOST=`hostname`<span class="Apple-tab-span" style="white-space: pre;"> </span># Hostname of this machine<br />
FSMAX="0" # Max. FS percentage value<br />
NEW_MAX="100"<br />
EXCEPTIONS="exceptions" # Overrides $FSMAX<br />
####################Init_done#############<br />
export NOW="$(date)"<br />
}<br />
writeHead(){<br />
echo '<HTML><HEAD><TITLE>Network Status</TITLE></HEAD><br />
<BODY alink="#0066ff" bgcolor="#ffffff" link="#0000ff" text="#000000" vlink="#0033ff">' > $MFILE<br />
echo '<CENTER><H1>' >> $MFILE<br />
echo "$MYNETINFO</H1>" >> $MFILE<br />
echo "Generated on $NOW" >> $MFILE<br />
echo '</CENTER>' >> $MFILE<br />
<br />
}<br />
writeTable(){<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
echo '<TABLE WIDTH=100% BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=4 FRAME=HSIDES RULES=NONE" >' >> $MFILE<br />
echo '<TR VALIGN=TOP>' >> $MFILE<br />
echo "<tr>" >> $MFILE<br />
echo "<th><b>HostName</th>" >> $MFILE<br />
echo "<th>Ping&Uptime</th>" >> $MFILE<br />
#echo "<th>Uptime</th>" >> $MFILE<br />
echo "<th>CPU & Total Processes</th>" >> $MFILE<br />
echo "<th>FileSystem</th>" >> $MFILE<br />
#echo "<th>Total Processes</th>" >> $MFILE<br />
echo "<th>Ram + Swap</th>" >> $MFILE<br />
echo "</tr>" >> $MFILE<br />
<br />
}<br />
check_exceptions (){<br />
<br />
# set -x # Uncomment to debug this function<br />
<br />
# Define a data file<br />
<br />
DATA_EXCEPTIONS="dfdata.out"<br />
<br />
# Ingore any line that begins with a pound sign, #<br />
<br />
cat $EXCEPTIONS | grep -v "^#" > $DATA_EXCEPTIONS<br />
<br />
while read FSNAME # Feeding Ddata from Bottom of Loop!!!<br />
do<br />
if [[ $FSNAME = $FSMOUNT ]] # Correct /mount_point?<br />
then # Get rid of the % sign, if it exists!<br />
return 0 # FOUND MAX OUT - Return 0<br />
fi<br />
<br />
done < $DATA_EXCEPTIONS # Feed from the bottom of the loop!!<br />
<br />
return 1 # Not found in File<br />
}<br />
load_LINUX_FS_data(){<br />
<br />
#df -k | tail -n +2 | egrep -v '/cdrom|dev|copper|VNAS|home' | awk '{print $4, $5}' | sed '/^\s*$/d' > $WORKFILE<br />
echo "df -k | tail -n +2 | egrep -v '/cdrom|dev|copper|VNAS|home' " |$_CMD "sudo su -" |awk '{print $4, $5}' | sed '/^\s*$/d' > $WORKFILE<br />
<br />
}<br />
load_Solaris_FS_data(){<br />
<br />
#df -k | tail +2 | egrep -v '/dev/fd|/etc/mnttab|/proc|/cdrom' | awk '{print $1, $5, $6}' > $WORKFILE<br />
#$_CMD "df -k | tail +2 | egrep -v '/dev/fd|/etc/mnttab|/proc|/cdrom'" | cut -d':' -f2 |awk '{print $5, $6}' > $WORKFILE<br />
#echo "df -k | tail +2 | egrep -v '/dev/fd|/etc/mnttab|/proc|/cdrom' " |$_CMD "sudo su -" | cut -d':' -f2|awk '{print $5, $6}' > $WORKFILE<br />
$_CMD "df -k | tail +2 | egrep -v '/dev/fd|/etc/mnttab|/proc|/cdrom|denied|'" | cut -d':' -f2 |awk '{print $5, $6}' > $WORKFILE<br />
<br />
}<br />
FS_Value(){<br />
OUTFILE="df.outfile" # Output display file<br />
>$OUTFILE<span class="Apple-tab-span" style="white-space: pre;"> </span># Initialize to empty<br />
while read FSVALUE FSMOUNT<br />
do<br />
# Strip out the % sign if it exists<br />
FSVALUE=$(echo $FSVALUE | sed s/\%//g) # Remove the % sign<br />
if [[ -s $EXCEPTIONS ]] # Do we have a non-empty file?<br />
then # Found it!<br />
<br />
# Look for the current $FSMOUNT value in the file<br />
# using the check_exceptions function defined above.<br />
<br />
check_exceptions<br />
if [ $? != 0 ] # Found it Exceeded!!<br />
then<br />
echo "<li>$FSMOUNT is <b>${FSVALUE}%</b></li>" >> $OUTFILE<br />
fi<br />
else # No exceptions file use the script default<br />
echo "<li>$FSMOUNT is <b>${FSVALUE}%</b></li>" >> $OUTFILE<br />
fi<br />
done < $WORKFILE # Feed the while loop from the bottom...<br />
}<br />
reportLinux(){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>_CMD="$SSH $USR@$host"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rhostname="$($_CMD hostname)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ruptime="$($_CMD uptime)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if $(echo $ruptime | grep -E "min|days" >/dev/null); then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>x=$(echo $ruptime | awk '{ print $3 $4}')<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>x=$(echo $ruptime | sed s/,//g| awk '{ print $3 " (hh:mm)"}')<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fi<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ruptime="$x"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rload="$($_CMD top -n 1 -b -u $USR | head -10 | grep Cpu | sed 's/ / /g' |cut -d " " -f2 | cut -d "%" -f1 )"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rusage="$($_CMD top -n 1 -b -u $USR | head -10 | grep Cpu | sed 's/ / /g' |cut -d " " -f5 | cut -d "%" -f1 )"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>y="$(echo "$rload >= $LOAD_WARN" | bc)" > /dev/null 2>&1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[ "$y" == "1" ] && rload="$RED $rload (High) $NOC" || rload="$GREEN $rload (Ok) $NOC"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rclock="$($_CMD date +"%r")"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rtotalprocess="$($_CMD ps axue | grep -vE "^USER|grep|ps" | wc -l)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rusedram="$($_CMD free -gto | grep Mem: | awk '{ print $3 }')"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rfreeram="$($_CMD free -gto | grep Mem: | awk '{ print $4 }')"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>c="$($_CMD free -gto | grep Mem: | awk '{ print $4 }')"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>y="$(echo "$rfreeram <=$MEM_WARN" | bc)" > /dev/null 2>&1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[ "$y" == "1" ] && rfreeram="$RED $rfreeram (HiGH) $NOC" || rfreeram="$GREEN $rfreeram (Ok) $NOC"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rtotalram="$($_CMD free -gto | grep Mem: | awk '{ print $2 }')"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rusedswap="$($_CMD free -t | awk '/Swap:/ {printf("%.2f\n", $3/$2*100)}')"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>y="$(echo "$rusedswap >=$SWAP_WARN" | bc)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[ "$y" == "1" ] && rusedswap="$RED $rusedswap % (HiGH) $NOC" || rusedswap="$GREEN $rusedswap (Ok) $NOC"<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>didl="$($_CMD /usr/bin/sar | grep Av | tail -1 | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | cut -d " " -f8)"<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>davg="$($_CMD /usr/bin/sar | grep Av | tail -1 | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | cut -d " " -f3)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>load_LINUX_FS_data<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>FS_Value<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>sed '/^$/d' $OUTFILE > $OUTFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$PING -c1 $host>/dev/null<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if [ "$?" != "0" ] ; then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rping="$RED Failed $NOC"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "</tr>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td <b> <font color="\#ff0000"> $host</b></td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="18%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Ping status: $rping</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td>FAILED TO CONNECT</td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="20%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>FAILED TO CONNECT</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="40%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>FAILED TO CONNECT</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width=22%>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>FAILED TO CONNECT</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "</tr>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rping="$GREEN Ok $NOC"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "</tr>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td <b> <font color="\#008000"> $host</b></td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="18%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Ping status: $rping</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Uptime<span class="Apple-tab-span" style="white-space: pre;"> </span> : $ruptime</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td>$ruptime</td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="18%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Cpu Load : $rload </li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Cpu Idle : $rusage%</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Tot. Process : $rtotalprocess</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="40%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>cat $OUTFILE >>$MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width=3%>$rtotalprocess</td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="24"%>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Used RAM <span class="Apple-tab-span" style="white-space: pre;"> </span> : $rusedram GB </li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Used SWAP : $rusedswap</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Free RAM <span class="Apple-tab-span" style="white-space: pre;"> </span> : $rfreeram GB</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Total RAM<span class="Apple-tab-span" style="white-space: pre;"> </span> : $rtotalram GB</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "</tr>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fi<br />
}<br />
reportUnix(){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>_CMD="$SSH $USR@$host"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rhostname="$($_CMD hostname)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ruptime="$($_CMD uptime)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if $(echo $ruptime | egrep -E "min|day" >/dev/null); then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>x=$(echo $ruptime | awk '{ print $3 $4}')<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>x=$(echo $ruptime | sed s/,//g| awk '{ print $3 " (hh:mm)"}')<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fi<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ruptime="$x"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rload="$($_CMD top -n 1 -b -u u5355680 | head -10 | grep "load averages" | awk '{print $3}' | sed s'/.$//' )"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rusage="$($_CMD top -n 1 -b -u u5355680 | head -10 | grep "CPU states" | awk '{print $3}' | sed s'/.$//' )"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>y="$(echo "$rload >= $LOAD_WARN" | bc)" > /dev/null 2>&1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[ "$y" == "1" ] && rload="$RED $rload (High) $NOC" || rload="$GREEN $rload (Ok) $NOC"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rclock="$($_CMD date +"%r")"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rtotalprocess="$($_CMD top -n 1 -b -u u5355680 | head -10 | grep processes | awk '{print $1}' )"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span># Available memory<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rtotalram="$($_CMD top -n 1 -b -u u5355680 | head -10 | grep Memory | awk '{print $2}' | sed s'/.$//')"<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>rtotalram="$($_CMD `echo "scale=2; $memory/1024" | bc -l` )"<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>rtotalram="$(`echo "scale=2; $memory/1024" | bc -l` )"<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span># Free memory<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>pagesize="$($_CMD pagesize )"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>kb_pagesize=`echo "scale=5; $pagesize/1024" | bc -l`<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>sar_freemem="$($_CMD sar -r 1 1 | tail -1 | awk 'BEGIN {FS=" "} {print $2}' )"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rfreeram=`echo "scale=2; $kb_pagesize*$sar_freemem/1024/1024" | bc -l`<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span># Used Memory<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rusedram=`echo "scale=2; $rtotalram-$rfreeram" | bc -l`<br />
<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>c="$($_CMD free -gto | grep Mem: | awk '{ print $4 }')"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>y="$(echo "$rfreeram <=$MEM_WARN" | bc)" > /dev/null 2>&1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[ "$y" == "1" ] && rfreeram="$RED $rfreeram (HiGH) $NOC" || rfreeram="$GREEN $rfreeram (Ok) $NOC"<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>rusedswap="$($_CMD free -t | awk '/Swap:/ {printf("%.2f\n", $3/$2*100)}')"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>swapinfo="$($_CMD "swap -s" )"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>usedswap=`echo $swapinfo | awk '{print $9}' | sed 's/k//'`<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rusedswap=`echo "scale=5; $usedswap/1024/1024"| bc -l`<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>swapavail=`echo $swapinfo | awk '{print $11}' | sed 's/k//'`<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rswapavail=`echo "scale=5; $swapavail/1024/1024"| bc -l`<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>swaptotal=`echo $rusedswap+$rswapavail | bc`<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>swapusedpercent=`echo "scale=5; ($rusedswap/$swaptotal)*100" | bc -l`<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "Swap utilization is at $swapusedpercent %"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>y="$(echo "$rusedswap >=$SWAP_WARN" | bc)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[ "$y" == "1" ] && rusedswap="$RED $rusedswap % (HiGH) $NOC" || rusedswap="$GREEN $rusedswap (Ok) $NOC"<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>didl="$($_CMD /usr/bin/sar | grep Av | tail -1 | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | cut -d " " -f8)"<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>davg="$($_CMD /usr/bin/sar | grep Av | tail -1 | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | cut -d " " -f3)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>load_Solaris_FS_data<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>FS_Value<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$PING -c1 $host>/dev/null<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if [ "$?" != "0" ] ; then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rping="$RED Failed $NOC"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "</tr>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td <b> <font color="\#ff0000"> $host</b></td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="18%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Ping status: $rping</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td>FAILED TO CONNECT</td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="20%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>FAILED TO CONNECT</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="40%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>FAILED TO CONNECT</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="22%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>FAILED TO CONNECT</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "</tr>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>rping="$GREEN Ok $NOC"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "</tr>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td <b> <font color="\#008000"> $host</b></td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="18%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Ping status: $rping</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Uptime<span class="Apple-tab-span" style="white-space: pre;"> </span> : $ruptime</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td>$ruptime</td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="18%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Cpu Load : $rload </li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Cpu Idle : $rusage%</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Tot. Process : $rtotalprocess</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="40%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>cat $OUTFILE >>$MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
#<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width=3%>$rtotalprocess</td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "<td width="24%">" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Used RAM <span class="Apple-tab-span" style="white-space: pre;"> </span> : $rusedram GB </li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Free RAM <span class="Apple-tab-span" style="white-space: pre;"> </span> : $rfreeram GB</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Total RAM<span class="Apple-tab-span" style="white-space: pre;"> </span> : $rtotalram GB</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Used SWAP : $rusedswap GB</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Free SWAP : $rswapavail GB</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " <li>Total SWAP : $swaptotal GB</li>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </ul>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo " </td>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "</tr>" >> $MFILE<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fi<br />
}<br />
main() {<br />
writeHead<br />
writeTable<br />
for host in $Q_HOST<br />
do<br />
_CMD="$SSH $USR@$host"<br />
runame="$($_CMD uname)"<br />
# This next case statement executes the correct ping # command based on the Unix flavor<br />
case $runame in<br />
AIX|OpenBSD|Linux)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>reportLinux<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>;;<br />
SunOS)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>reportUnix<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>;;<br />
*)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "\nERROR: Unsupported Operating System - $(uname)"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "\n\t. . .EXITING. . .\n"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>exit 1<br />
esac<br />
<br />
done<br />
echo "</tr></table>" >> $MFILE<br />
echo "</BODY></HTML>" >> $MFILE<br />
<br />
if grep "Ping status" $MFILE<br />
then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SFLAG=0<br />
else<br />
SFLAG=1<br />
fi<br />
<br />
if [[ "$SFLAG" -eq "0" ]] ; then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "All servers are running Fine on $(date)" >> "$LOGDEST"<br />
<br />
fi<br />
}<br />
initVar<br />
main<br />
<br />
mail -s "$(echo -e "$SUB\nContent-Type: text/html")" $TOLIST < $MFILE
</div>
</div>
<br />
<br />
So lets try this in you environment and let me know if any questions. </div>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-82596625401420959642015-12-31T16:50:00.000+05:302016-01-30T20:51:40.392+05:30Jdeveloper composite deployment error : java.lang.NoClassDefFoundError: oracle/integration/platform/common/MDSSessionBuilder <div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
<table border="0" cellspacing="5" style="background-color: transparent;"></table>
</h4>
<h2>
</h2>
<table border="0" cellpadding="10" style="width: 100%px;"><tbody>
<tr><td bgcolor="white" valign="top" width="100%"><pre><span style="font-family: "courier new";"><span style="font-size: large;"><table border="0" cellpadding="10" style="width: 876px;"><tbody>
</tbody></table>
Error 500--Internal Server Error</span><span style="font-size: xx-small;">
<div class="kmcodeblock" style="background-color: #e0eaf1; border: 1px solid rgb(196, 209, 230); font-family: 'Courier New', Courier, monospace; font-size: 10px; margin: 5px 0px 0px; padding: 0.5em;">
java.lang.NoClassDefFoundError: oracle/integration/platform/common/MDSSessionBuilder
at oracle.integration.platform.blocks.deploy.servlet.MDSManagerUtils.getMDSSession(MDSManagerUtils.java:203)
at oracle.integration.platform.blocks.deploy.servlet.MDSManager.transferCompositeData(MDSManager.java:494)
at oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deploySARs(BaseDeployProcessor.java:243)
at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWork(DeployProcessor.java:203)
at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWork(DeployProcessor.java:147)
at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeploy(DeployProcessor.java:134)
at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.process(DeployProcessor.java:100)
at oracle.integration.platform.blocks.deploy.servlet.CompositeDeployerServlet.doPostInsideLoggingSession(CompositeDeployerServlet.java:221)
at oracle.integration.platform.blocks.deploy.servlet.CompositeDeployerServlet.doPost(CompositeDeployerServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:138)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:464)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:121)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:211)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:138)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:464)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:121)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:211)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
</div>
</span></span><h4>
<a name='more'></a>
<span style="background-color: transparent; font-family: "courier new";"><b>Cause:</b></span></h4>
</pre>
<div>
<span style="font-family: "courier new";">Above error is common when one used to install OHS 11.1.1.9 </span><span style="background-color: transparent; font-family: "courier new";">into </span><span style="background-color: transparent; font-family: "courier new";">FMW 11.1.1.7 environment. Due to this OHS updates soa </span><span style="background-color: transparent; font-family: "courier new";">modules from </span><span style="background-color: transparent; font-family: "courier new";">11.1.1.7 version to 11.1.1.9.</span></div>
<span style="font-family: "courier new";">
</span>
<br />
<div>
<span style="background-color: transparent; font-family: "courier new";"><br /></span>
<br />
<h4>
<span style="background-color: transparent; font-family: "courier new";"><b>Solution:</b> </span></h4>
</div>
<span style="font-family: "courier new";">
</span>
<br />
<div>
<span style="font-family: "courier new";">Uninstall OHS from FMW environment. </span></div>
<span style="font-family: "courier new";">
</span>
<br />
<div>
<span style="font-family: "courier new";">Restore FMW 11.1.1.7 from 11.1.1.9 from backups.</span></div>
<span style="font-family: "courier new";">
</span>
<br />
<div>
<span style="font-family: "courier new";">OHS11.1.1.9 can be installed in new middleware_home.</span></div>
<span style="font-family: "courier new";">
</span>
<div>
<span style="font-family: "courier new";"><br /></span></div>
<span style="font-family: "courier new";">
<div>
That's it.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</span></td></tr>
</tbody></table>
</div>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-39507437543877704092015-05-16T19:02:00.000+05:302016-01-30T20:50:21.074+05:30How to Create Credential Mappings for a WebLogic Server Datasource Using WLST<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: small;"><span id="pt1:r1:ot71" style="color: black;">This article describes how to create Credential Mappings for an existing WebLogic Server Datasource using WLST.<br /> </span></span><br />
<h2 class="km">
<span style="font-size: small;"><span id="pt1:r1:ot71" style="color: black;"><a href="https://www.blogger.com/null" name="FIX"></a>Fix</span></span></h2>
<span style="font-size: small;"><span id="pt1:r1:ot71" style="color: black;">You can use a WLST <a class="zem_slink" href="http://www.python.org/" rel="homepage" target="_blank" title="Python (programming language)">Python script</a> to create Credential Mappings for an existing WebLogic Server Datasource. Create the filename with a .py extention with the following content: for example, JDBCCredentialMapping.py. In the script make modifications according to your environment and requirement specifying the DataSource Name (<datasource name="">), Domain Name (<domainname wlsusername="">), remoteUsername (<wlsusername>), remotePassword </wlsusername></domainname></datasource></span></span><br />
<a href="https://www.blogger.com/null" name="more"></a><span style="font-size: small;"><span id="pt1:r1:ot71" style="color: black;">(<remotePassword>) and WLST domain connect parameters specifying domain username, password and listen address.<br /> </span></span><br />
<div class="kmcodeblock" style="background-color: #e0eaf1; border: 1px solid rgb(196, 209, 230); font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 5px 0px 0px; overflow: auto; padding: 0.5em;">
<span style="font-size: small;"><span id="pt1:r1:ot71" style="color: black;"><code class="km">resourceId = 'type=<jdbc>, application=, module=, resourceType=ConnectionPool, resource=<DataSource Name>, action=reserve'<br />wlsUsername = '<wlsUsername>'<br />remoteUsername = '<remoteUsername>'<br />remotePassword = '<remotePassword>'<br /><a class="zem_slink" href="http://en.wikipedia.org/wiki/Domain_name" rel="wikipedia" target="_blank" title="Domain name">domainName</a> = '<domainname>'</domainname><br />connect('<username>','<password>','t3://<listenaddress>:<PortNo>')<br />serverConfig()<br />cd("//")<br />rlm = cmo.getSecurityConfiguration().getDefaultRealm()<br />credMapProv = rlm.lookupCredentialMapper("DefaultCredentialMapper")<br />credMapProv.setUserPasswordCredential(resourceId, remoteUsername, remotePassword)<br />credMapProv.setUserPasswordCredentialMapping(resourceId, wlsUsername, remoteUsername)<br />disconnect()<br />exit()</code></span></span></div>
<span style="font-size: small;"><span id="pt1:r1:ot71" style="color: black;">Set the WebLogic Server <a class="zem_slink" href="http://en.wikipedia.org/wiki/Environment_variable" rel="wikipedia" target="_blank" title="Environment variable">environment variables</a> by running setDomainEnv.cmd/sh script inside the ${DOMAIN_HOME}/bin folder and run the WLST python script as below. In this example. we assume the python script name JDBCCredentialMapping.py.</span></span><br />
<div class="kmcodeblock" style="width: 95%;">
<span style="font-size: small;"><span id="pt1:r1:ot71" style="color: black;"><code class="km">java weblogic.WLST JDBCCredentialMapping.py</code></span></span></div>
<span style="font-size: small;"><span id="pt1:r1:ot71" style="color: black;">
Once the python script is executed in WLST, log in to the <a class="zem_slink" href="http://maps.google.com/maps?ll=41.5558611111,-87.8483888889&spn=0.01,0.01&q=41.5558611111,-87.8483888889%20(WLS%20%28AM%29)&t=h" rel="geolocation" target="_blank" title="WLS (AM)">WLS</a> console, navigate to Datasource -> Security -> Credential Mappings. You can see the specified WLS User and Remote User credentials created.</span></span></div>Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0tag:blogger.com,1999:blog-4135016378492662719.post-22729952119068214902014-09-14T13:12:00.002+05:302016-01-30T20:52:17.038+05:30Weblogic Scripting Tool (WLST) Fundamentals<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<ul style="text-align: left;">
<li><h4>
<span style="font-size: small;">WLS command-line tools are useful :</span></h4>
</li>
</ul>
<span style="font-size: small;">- For automating common administrative activities</span><br />
<span style="font-size: small;">- As an alternative to the Administration Console</span><br />
<span style="font-size: small;">- When Graphical tools are not supported</span><br />
<span style="font-size: small;"><br /></span>
<br />
<ul style="text-align: left;">
<li><h4>
<span style="font-size: small;">WLST provides a command-line interface for :</span></h4>
</li>
</ul>
<span style="font-size: small;">- Creating new weblogic Domains</span><br />
<span style="font-size: small;">- Retrieving and updating Weblogic Domain Configurations </span><br />
<span style="font-size: small;">- Deploying Applications</span><br />
<span style="font-size: small;">- Obtaining run-time server statistics</span><br />
<span style="font-size: small;"><br /></span>
<br />
<ul style="text-align: left;">
<li><h4 style="text-align: left;">
<span style="font-size: small;">WLST is implemented using Jython which in turn is a Java implementation of the Python scripting Languages:</span></h4>
</li>
</ul>
<span style="font-size: small;">-simple and clear syntax</span><br />
<span style="font-size: small;">-indentation to structure code</span><br />
<span style="font-size: small;">-interactive command mode</span><br />
<span style="font-size: small;">-custom commands</span><br />
<span style="font-size: small;">-integration with any Java libraries</span><br />
<span style="font-size: small;"></span><br />
<a href="https://www.blogger.com/null" name="more"></a><br />
<a name='more'></a><br /><br />
<h3 style="text-align: left;">
<span style="font-size: small;">Using Jython</span></h3>
<h4 style="text-align: left;">
<span style="font-size: small;">Jython can interpret commands in 3 ways :</span></h4>
<div style="text-align: left;">
<span style="font-size: small;">- <u>Interactive</u> :Supply commands one at a time from a command promt</span></div>
<div style="text-align: left;">
<span style="font-size: small;">- <u>Batch :</u> Provides a series of commands in a script file ( .py)</span></div>
<div style="text-align: left;">
<span style="font-size: small;">- <u>Embedded :</u> Run Jython interpretor within a Java class</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-size: small;">WLST Modes</span></h3>
<h4 style="text-align: left;">
<span style="font-size: small;">Online mode:</span></h4>
<div style="text-align: left;">
<span style="font-size: small;">- Connected to a running server</span></div>
<div style="text-align: left;">
<span style="font-size: small;">- Access to all Weblogic configuration and run-time attributes</span></div>
<div style="text-align: left;">
<span style="font-size: small;">- Create and activate change session similar to Admin console.</span></div>
<h4 style="text-align: left;">
<span style="font-size: small;">Offline Mode :</span></h4>
<div style="text-align: left;">
<span style="font-size: small;">- Domain not working</span></div>
<div style="text-align: left;">
<span style="font-size: small;">- Access to only persisted domain configuration (config.xml)</span></div>
<div style="text-align: left;">
<span style="font-size: small;">- Create 0r update domain similar to using configuration wizard</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-size: small;">Running WLST scripts</span></h3>
<div style="text-align: left;">
<span style="font-size: small;">- use the <u><i>setWLSEnv</i></u> script to initialize the <u><i>PATH</i></u> and <u>CLASSPATH</u> required for <i>WLST</i></span></div>
<div style="text-align: left;">
<span style="font-size: small;">- If no script file supplied WLSt will run in interactive mode.</span></div>
<div style="text-align: left;">
<span style="font-size: small;">- The execfile() command can be used to run scripts</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<div class="kmcodeblock">
<div style="text-align: left;">
<span style="font-size: small;">>setWLSEnv.sh</span></div>
<div style="text-align: left;">
<span style="font-size: small;">>java weblogic.WLST [scriptfile.py]</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<div style="text-align: left;">
<div style="text-align: left;">
<span style="font-size: small;"><b>To support SSL connection to a server</b></span></div>
</div>
<div style="text-align: left;">
<span style="font-size: small;">>java -Dweblogic.security.SSL.ignoreHostNameVerification=true -Dweblogic.security.TrustKyStore=DemoTrust weblogic.WLST </span></div>
</div>
</div>
<span style="font-size: small;"><br /></span>
<br />
<h3 style="text-align: left;">
<span style="font-size: small;">Generic WLST Commands</span></h3>
<div style="text-align: left;">
<span style="font-size: small;">help - Get help for a given WLST commands</span></div>
<div style="text-align: left;">
<span style="font-size: small;">exit - Quit WLST</span></div>
<div style="text-align: left;">
<span style="font-size: small;">dumpVariables - Display all variables used by WLST</span></div>
<div style="text-align: left;">
<span style="font-size: small;">dumpStack - Display the stack trace of last error occurred in WLST</span></div>
<div style="text-align: left;">
<span style="font-size: small;">redirect/stopRedirect - Redirect all WLST output to a file.</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-size: small;">Offline WLST Commands</span></h3>
<div style="text-align: left;">
<span style="font-size: small;">createDomain -create domain by using given template</span></div>
<div style="text-align: left;">
<span style="font-size: small;">readDomain - open existing domain on the file system</span></div>
<div style="text-align: left;">
<span style="font-size: small;">readTemplate - open a existing domain template</span></div>
<div style="text-align: left;">
<span style="font-size: small;">addTemplate - apply template file to current domain</span></div>
<div style="text-align: left;">
<span style="font-size: small;">updateDomain - save changes to current domains</span></div>
<div style="text-align: left;">
<span style="font-size: small;">writeDomain -</span><span style="font-size: small;"> save changes to current domain in a specific directory</span></div>
<div style="text-align: left;">
<span style="font-size: small;">writeTemplate - </span><span style="font-size: small;">save current domain to a template file</span></div>
<div style="text-align: left;">
<span style="font-size: small;">assign/unassign - target application to servers</span></div>
<div style="text-align: left;">
<span style="font-size: small;">setOption - configure domain creation options</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h4 style="text-align: left;">
<span style="font-size: small;">WLST : Creating a Domain Example</span></h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU4oGnKtBeR0nPpXWjv6dO8JArLJvAsbz5qLkvdYMqQvxcv95PvdYZAz4CsxhGgo0O8XZqUua40CLWLTxTcYNoLraYDoHOx0Gh0LpdRzmKdlHglTtzsmowKKV9vZyMWBEBMPJRqzeV_MU/s1600/MT7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Creating a Domain Example" border="0" height="326" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU4oGnKtBeR0nPpXWjv6dO8JArLJvAsbz5qLkvdYMqQvxcv95PvdYZAz4CsxhGgo0O8XZqUua40CLWLTxTcYNoLraYDoHOx0Gh0LpdRzmKdlHglTtzsmowKKV9vZyMWBEBMPJRqzeV_MU/s1600/MT7.jpg" title="Creating a Domain Example" width="640" /></a></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-size: small;">O</span><span style="font-size: small;">nline WLST Commands</span></h3>
<div style="text-align: left;">
<span style="font-size: small;">connect - connect to a server by supply credentials</span></div>
<div style="text-align: left;">
<span style="font-size: small;">disconnect - disconnect from the current server</span></div>
<div style="text-align: left;">
<span style="font-size: small;">shutdown - shut down server</span></div>
<div style="text-align: left;">
<span style="font-size: small;">start - use the node manager to start the servers</span></div>
<div style="text-align: left;">
<span style="font-size: small;">startEdit - Begin a new change session</span></div>
<div style="text-align: left;">
<span style="font-size: small;">stopEdit - Release the edit lock and discard any changes</span></div>
<div style="text-align: left;">
<span style="font-size: small;">activate - commit all changes in the current session</span></div>
<div style="text-align: left;">
<span style="font-size: small;">showChanges - List all changes made in current session</span></div>
<div style="text-align: left;">
<span style="font-size: small;">isRestartRequired - Determine if any changes required server restart</span></div>
<div style="text-align: left;">
<span style="font-size: small;">deploy/redeploy -Deploy an application to a server</span></div>
<div style="text-align: left;">
<span style="font-size: small;">undeploy - Shut down a running application on servers</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-size: small;">Weblogic JMX : Overview</span></h3>
<h4 style="text-align: left;">
<span style="font-size: small;">JMX MBeans:</span></h4>
<ul style="text-align: left;">
<li><span style="font-size: small;">- are java objects found on the server</span></li>
<li><span style="font-size: small;">- have attributes and operations</span></li>
<li><span style="font-size: small;">- support the configurations, management and monitoring of all type of server resources </span></li>
</ul>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0qW0vuGH0nknRUDsM-QQGEVmdTF-JkJel3Ggzk1cXk0m8UYQm9lIPXPipIph0o4EYt8-az6Tp3ES71FGc8TSFQDgbhKXqHnqamM1NDvCHVONfWQjJcQFAB307QmuvttUZUWntQeSMfk/s1600/MT6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="JMX MBeans" border="0" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0qW0vuGH0nknRUDsM-QQGEVmdTF-JkJel3Ggzk1cXk0m8UYQm9lIPXPipIph0o4EYt8-az6Tp3ES71FGc8TSFQDgbhKXqHnqamM1NDvCHVONfWQjJcQFAB307QmuvttUZUWntQeSMfk/s1600/MT6.jpg" title="JMX MBeans" width="640" /></a></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h4 style="text-align: left;">
<span style="font-size: small;">Navigating JMX MBeans</span></h4>
<ul style="text-align: left;">
<li><span style="font-size: small;">Use the <i>cd, ls </i>and <i>pw</i>d commands to navigate server configurations or run-time MBeans, similar to a file system.</span></li>
<li><span style="font-size: small;">Use <i>get</i> and <i>set </i>commands to read or update MBean attribute</span></li>
<li><span style="font-size: small;">The <i>cmo </i>variable refer to the current MBean</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqjEwhD13gx4sT9eF9RJZDcY16lOmaJ60ok0Vqq0ptTB3BfGlO4AEuJZxnyxBHHymcNtslsxfG3U_A32VVUI-7srJ5ytArnAQYBbKSLGMNdHF6yw5ei2_gY_LVxG_9xsWH7yQxc_pjjDw/s1600/MT8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Navigating JMX MBeans" border="0" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqjEwhD13gx4sT9eF9RJZDcY16lOmaJ60ok0Vqq0ptTB3BfGlO4AEuJZxnyxBHHymcNtslsxfG3U_A32VVUI-7srJ5ytArnAQYBbKSLGMNdHF6yw5ei2_gY_LVxG_9xsWH7yQxc_pjjDw/s1600/MT8.jpg" title="Navigating JMX MBeans" width="640" /></a></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h4 style="text-align: left;">
<span style="font-size: small;">WLST : creating a server example</span></h4>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrKmg74VKIqJvIMhDQejZXUz6v-FYxJMaHrQeQ0Yo_HA-2kwyqfc535IHzotQLlp-95EZRiP6tge3lxFtb4s3PM_puig37Pn0w_c9cvFq3Q9bEiKRjdrl_GvpDQUFfuWWd62WNpMqfIU/s1600/MT9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="creating a server example" border="0" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNrKmg74VKIqJvIMhDQejZXUz6v-FYxJMaHrQeQ0Yo_HA-2kwyqfc535IHzotQLlp-95EZRiP6tge3lxFtb4s3PM_puig37Pn0w_c9cvFq3Q9bEiKRjdrl_GvpDQUFfuWWd62WNpMqfIU/s1600/MT9.jpg" title="creating a server example" width="640" /></a></div>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
<h4 style="text-align: left;">
<span style="font-size: small;">Generate a WLST script from Admin console</span></h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizZAfa_H8ecejUsT1z7YNVk1tVVv_li5Def-P9dfQPbRqMEW-h9acaJvHHyoYP0kgsK3PK1aliRvgmAgOoIu299frKDDfe5nf4Z4Sw43Aml3_p76KQusrYCG2EpDjWXoooOzUXZVal5uI/s1600/MT10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Generate a WLST script from Admin console" border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizZAfa_H8ecejUsT1z7YNVk1tVVv_li5Def-P9dfQPbRqMEW-h9acaJvHHyoYP0kgsK3PK1aliRvgmAgOoIu299frKDDfe5nf4Z4Sw43Aml3_p76KQusrYCG2EpDjWXoooOzUXZVal5uI/s1600/MT10.jpg" title="Generate a WLST script from Admin console" width="640" /></a></div>
<h4 style="text-align: left;">
<span style="font-size: small;"><br /></span></h4>
<div style="text-align: left;">
<span style="font-size: small;"><br /></span></div>
</div>
Ajithttp://www.blogger.com/profile/11547917903592683627noreply@blogger.com0