tag:blogger.com,1999:blog-22371069661281765542024-03-06T08:18:16.798+01:00Hil and Co IT SolutionsUnknownnoreply@blogger.comBlogger132125tag:blogger.com,1999:blog-2237106966128176554.post-30395957582701346092023-08-13T14:31:00.004+02:002023-08-13T15:02:04.849+02:00K3s on MacBook M1 with multipass<div><h2 class="code-line" data-line-end="3" data-line-start="2" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: "source sans pro", "helvetica neue", Helvetica, Arial, sans-serif; font-feature-settings: "dlig", "liga", "lnum", "kern"; font-size: 1.95312rem; line-height: 3rem; margin-bottom: 0.183584rem; margin-top: 0px; padding-top: 0.816416rem;">Setting Up a Kubernetes Cluster with Multipass and K3s</h2><p class="has-line-data" data-line-end="5" data-line-start="4" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">In this tutorial, we will walk through the process of setting up a lightweight Kubernetes cluster using Multipass and K3s. Multipass is a tool that allows you to create and manage virtual machines on your local machine, and K3s is a lightweight Kubernetes distribution that is designed for resource-constrained environments. This combination makes it easy to create a local Kubernetes playground for development and testing purposes.</p><h2 class="code-line" data-line-end="6" data-line-start="5" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: "source sans pro", "helvetica neue", Helvetica, Arial, sans-serif; font-feature-settings: "dlig", "liga", "lnum", "kern"; font-size: 1.95312rem; line-height: 3rem; margin-bottom: 0.183584rem; margin-top: 0px; padding-top: 0.816416rem;"><a id="Prerequisites_5" style="background: 0px 0px; box-sizing: border-box; color: #a0aabf; cursor: pointer; text-decoration-line: underline;"></a>Prerequisites</h2><p class="has-line-data" data-line-end="8" data-line-start="7" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">Before you begin, make sure you have the following prerequisites installed on your machine:</p><ul style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-size: 14px; margin-bottom: 0.83999rem; padding-top: 0.16001rem;"><li class="has-line-data" data-line-end="9" data-line-start="8" style="box-sizing: border-box; font-feature-settings: "kern", "onum", "liga"; margin-left: 1rem;"><a href="https://brew.sh/" style="background: 0px 0px; box-sizing: border-box; color: #a0aabf; cursor: pointer;">Homebrew</a> : A package manager for macOS.</li></ul><h2 class="code-line" data-line-end="10" data-line-start="9" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: "source sans pro", "helvetica neue", Helvetica, Arial, sans-serif; font-feature-settings: "dlig", "liga", "lnum", "kern"; font-size: 1.95312rem; line-height: 3rem; margin-bottom: 0.183584rem; margin-top: 0px; padding-top: 0.816416rem;"><a id="Installation_9" style="background: 0px 0px; box-sizing: border-box; color: #a0aabf; cursor: pointer; text-decoration-line: underline;"></a>Installation</h2><p class="has-line-data" data-line-end="12" data-line-start="11" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">To get started, open your terminal and execute the following commands to install Multipass using Homebrew:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="17" data-line-start="14" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
brew install --cask multipass
</code></pre><h2 class="code-line" data-line-end="20" data-line-start="19" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: "source sans pro", "helvetica neue", Helvetica, Arial, sans-serif; font-feature-settings: "dlig", "liga", "lnum", "kern"; font-size: 1.95312rem; line-height: 3rem; margin-bottom: 0.183584rem; margin-top: 0px; padding-top: 0.816416rem;"><a id="Creating_the_Kubernetes_Master_Node_19" style="background: 0px 0px; box-sizing: border-box; color: #a0aabf; cursor: pointer; text-decoration-line: underline;"></a>Creating the Kubernetes Master Node</h2><p class="has-line-data" data-line-end="22" data-line-start="21" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">Let’s start by creating the Kubernetes master node using Multipass. Run the following commands to launch the VM and set its resources:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="27" data-line-start="24" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
multipass launch --name k3s --mem <span class="hljs-number" style="box-sizing: border-box; color: #2aa198;">4</span>G --disk <span class="hljs-number" style="box-sizing: border-box; color: #2aa198;">10</span>G
</code></pre><p class="has-line-data" data-line-end="31" data-line-start="30" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">After the VM is launched, access its shell using:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="36" data-line-start="33" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
multipass shell k3s
</code></pre><p class="has-line-data" data-line-end="40" data-line-start="39" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">Inside the VM’s shell, run the following commands to install K3s:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="45" data-line-start="42" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
curl -sfL https://get.k3s.io | sh -
</code></pre><p class="has-line-data" data-line-end="49" data-line-start="48" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">Retrieve the Kubernetes token and the VM’s IP address:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="55" data-line-start="51" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
mytoken=$(multipass <span class="hljs-built_in" style="box-sizing: border-box; color: #268bd2;">exec</span> k3s sudo cat /var/lib/rancher/k3s/server/node-token)
myip=$(multipass info k3s | grep -i ip | tr <span class="hljs-operator" style="box-sizing: border-box;">-d</span> <span class="hljs-string" style="box-sizing: border-box; color: #2aa198;">' '</span>) ; myip=<span class="hljs-variable" style="box-sizing: border-box; color: #b58900;">${myip/IPv4:/}</span> ; <span class="hljs-built_in" style="box-sizing: border-box; color: #268bd2;">echo</span> <span class="hljs-variable" style="box-sizing: border-box; color: #b58900;">$myip</span>
</code></pre><h2 class="code-line" data-line-end="58" data-line-start="57" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: "source sans pro", "helvetica neue", Helvetica, Arial, sans-serif; font-feature-settings: "dlig", "liga", "lnum", "kern"; font-size: 1.95312rem; line-height: 3rem; margin-bottom: 0.183584rem; margin-top: 0px; padding-top: 0.816416rem;"><a id="Creating_Worker_Nodes_57" style="background: 0px 0px; box-sizing: border-box; color: #a0aabf; cursor: pointer; text-decoration-line: underline;"></a>Creating Worker Nodes</h2><p class="has-line-data" data-line-end="60" data-line-start="59" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">Next, let’s create two Kubernetes worker nodes named <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: monospace, monospace; font-size: 1em; padding: 2px 4px;">k3s-w1</code> and <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: #c7254e; font-family: monospace, monospace; font-size: 1em; padding: 2px 4px;">k3s-w2</code> with the following commands:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="66" data-line-start="62" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
multipass launch --name k3s-w1 --mem <span class="hljs-number" style="box-sizing: border-box; color: #2aa198;">2</span>G --disk <span class="hljs-number" style="box-sizing: border-box; color: #2aa198;">10</span>G
multipass launch --name k3s-w2 --mem <span class="hljs-number" style="box-sizing: border-box; color: #2aa198;">2</span>G --disk <span class="hljs-number" style="box-sizing: border-box; color: #2aa198;">10</span>G
</code></pre><p class="has-line-data" data-line-end="70" data-line-start="69" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">Run the following commands to install K3s on the worker nodes:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="76" data-line-start="72" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
multipass <span class="hljs-built_in" style="box-sizing: border-box; color: #268bd2;">exec</span> k3s-w1 -- bash -c <span class="hljs-string" style="box-sizing: border-box; color: #2aa198;">"curl -sfL https://get.k3s.io | K3S_URL=https://<span class="hljs-variable" style="box-sizing: border-box; color: #b58900;">$myip</span>:6443 K3S_TOKEN=<span class="hljs-variable" style="box-sizing: border-box; color: #b58900;">$mytoken</span> sh -"</span>
multipass <span class="hljs-built_in" style="box-sizing: border-box; color: #268bd2;">exec</span> k3s-w2 -- bash -c <span class="hljs-string" style="box-sizing: border-box; color: #2aa198;">"curl -sfL https://get.k3s.io | K3S_URL=https://<span class="hljs-variable" style="box-sizing: border-box; color: #b58900;">$myip</span>:6443 K3S_TOKEN=<span class="hljs-variable" style="box-sizing: border-box; color: #b58900;">$mytoken</span> sh -"</span>
</code></pre><h2 class="code-line" data-line-end="79" data-line-start="78" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: "source sans pro", "helvetica neue", Helvetica, Arial, sans-serif; font-feature-settings: "dlig", "liga", "lnum", "kern"; font-size: 1.95312rem; line-height: 3rem; margin-bottom: 0.183584rem; margin-top: 0px; padding-top: 0.816416rem;"><a id="Verifying_the_Cluster_78" style="background: 0px 0px; box-sizing: border-box; color: #a0aabf; cursor: pointer; text-decoration-line: underline;"></a>Verifying the Cluster</h2><p class="has-line-data" data-line-end="81" data-line-start="80" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">Now that the cluster is set up, let’s verify it by checking the nodes:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="86" data-line-start="83" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
multipass <span class="hljs-built_in" style="box-sizing: border-box; color: #268bd2;">exec</span> k3s -- bash -c <span class="hljs-string" style="box-sizing: border-box; color: #2aa198;">"sudo kubectl get nodes"</span>
</code></pre><h2 class="code-line" data-line-end="89" data-line-start="88" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: "source sans pro", "helvetica neue", Helvetica, Arial, sans-serif; font-feature-settings: "dlig", "liga", "lnum", "kern"; font-size: 1.95312rem; line-height: 3rem; margin-bottom: 0.183584rem; margin-top: 0px; padding-top: 0.816416rem;"><a id="Cleanup_88" style="background: 0px 0px; box-sizing: border-box; color: #a0aabf; cursor: pointer; text-decoration-line: underline;"></a>Cleanup</h2><p class="has-line-data" data-line-end="91" data-line-start="90" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">After you’ve finished working with the Kubernetes cluster, you can delete the VMs using the following commands:</p><pre style="background: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0.75rem, rgb(245, 247, 250) 0.75rem, rgb(245, 247, 250) 2.75rem, rgb(255, 255, 255) 2.75rem, rgb(255, 255, 255) 4rem) 0% 0% / 100% 4rem rgb(255, 255, 255); border-radius: 4px; border: 1px solid rgb(211, 218, 234); box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 14px; line-height: 2rem; margin-bottom: 1.33999rem; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0.66001rem 9.5px 9.5px; word-break: break-all;"><code class="has-line-data" data-line-end="97" data-line-start="93" style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; text-wrap: wrap;">
multipass delete k3s k3s-w1 k3s-w2
multipass purge
</code></pre><h2 class="code-line" data-line-end="100" data-line-start="99" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: "source sans pro", "helvetica neue", Helvetica, Arial, sans-serif; font-feature-settings: "dlig", "liga", "lnum", "kern"; font-size: 1.95312rem; line-height: 3rem; margin-bottom: 0.183584rem; margin-top: 0px; padding-top: 0.816416rem;"><a id="Conclusion_99" style="background: 0px 0px; box-sizing: border-box; color: #a0aabf; cursor: pointer; text-decoration-line: underline;"></a>Conclusion</h2><p class="has-line-data" data-line-end="102" data-line-start="101" style="background-color: white; box-sizing: border-box; color: #373d49; font-family: Georgia, Cambria, serif; font-feature-settings: "kern", "onum", "liga"; font-size: 14px; margin-bottom: 1.33999rem; margin-top: 0px; padding-top: 0.66001rem;">In this tutorial, we’ve learned how to set up a Kubernetes cluster using Multipass and K3s. This lightweight setup is ideal for local development and testing purposes. It allows you to experiment with Kubernetes concepts without the need for a cloud-based environment. Remember that this setup is not suitable for production environments, but it’s a great tool for learning and exploration.</p></div>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-19938617778617180672022-09-01T13:55:00.006+02:002022-09-01T14:03:25.394+02:00Remove Rancher<pre>
<code>
git clone https://github.com/rancher/rancher-cleanup.git
cd rancher-cleanup/
kubectl create -f deploy/rancher-cleanup.yaml
kubectl -n kube-system logs -l job-name=cleanup-job -f
kubectl -n cattle-system get pods | grep ^rancher | head -n 1 | awk '{ print $1 }'
kubectl create -f deploy/verify.yaml
kubectl -n kube-system logs -l job-name=verify-job -f
kubectl -n kube-system logs -l job-name=verify-job -f | grep -v "is deprecated"
kubectl get namespace
</code>
</pre>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-38427293223541740462022-09-01T13:26:00.003+02:002022-09-01T13:26:46.261+02:00Installing Rancher on Azure Kubernetes Service<pre>
<code>
brew update && brew install azure-cli && brew install helm
az login
az group create --name rancher02-rg --location eastus
az aks get-versions --location eastus --output table
az aks create --resource-group rancher02-rg --name rancher-server --kubernetes-version 1.19.13 --node-count 1 --node-vm-size Standard_D2_v3
az aks get-credentials --resource-group rancher02-rg --name rancher-server
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm upgrade --install \
ingress-nginx ingress-nginx/ingress-nginx \
--namespace ingress-nginx \
--set controller.service.type=LoadBalancer \
--version 3.12.0 \
--create-namespace
kubectl get service ingress-nginx-controller --namespace=ingress-nginx
https://rancher42.eastus.cloudapp.azure.com
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
kubectl create namespace cattle-system
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml
#kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.1.0/cert-manager.yaml
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.5.1
kubectl get pods --namespace cert-manager
# we use letsEncrypt
# OK:
helm install rancher rancher-stable/rancher \
--namespace cattle-system \
--set hostname=rancher42.eastus.cloudapp.azure.com \
--set replicas=1 \
--set ingress.tls.source=letsEncrypt \
--set letsEncrypt.email=mail@gmail.com
kubectl -n cattle-system rollout status deploy/rancher
kubectl -n cattle-system describe pod
kubectl -n cattle-system get pods
kubectl -n cattle-system logs -f rancher-784d94f59b-vgqzh
curl -v rancher42.eastus.cloudapp.azure.com
</code>
</pre>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-57828680579493328962021-05-11T11:26:00.005+02:002021-05-11T11:26:41.574+02:00How to view SSL certificate (PEM file) using openssl ? openssl x509 -noout -text -in cert.pem<div><strong style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: AvenirDemi; font-size: 17px; margin: 0px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;"><br /></strong></div>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-68562770882309597162021-05-11T10:59:00.007+02:002021-05-11T11:31:46.862+02:00Docker Commands<p><br /></p><br /><h4 style="text-align: left;">System information</h4><br />docker version<br /><br />docker info<br /><br /><h4 style="text-align: left;">Pull images</h4><div>docker pull <image></div><div><br /></div><div><h3 style="text-align: left;">Login to the docker hub repository</h3><div>docker login</div><h4 style="text-align: left;">List images</h4></div>docker images<br /><br /><div><h4 style="text-align: left;">Remove images</h4>doceker rmi<br /><br /><br /></div><div><h4>Run Container</h4></div>docker run -p 8080:80 <container><div><br /></div><div><h4 style="text-align: left;">Run Detached Mode</h4><div>docker run -it -d --name <container> <image>:latest bash</div><div><h4 style="text-align: left;">List Containers</h4></div><div>docker ps -a</div><div><br /></div><div><h4>Stop Container</h4></div><div>docker stop <container></div><h4>Start Container</h4><h4><div style="font-weight: 400;"></div><div style="font-weight: 400;">docker start <container></div><div><br /></div><div><h4><div style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></div></h4></div></h4><h4>Restart Container</h4><h4><div style="font-weight: 400;">docker restart <container></div><div><br /></div></h4><h4>Remove Containers</h4><div>docker rm -f <container></div><div><br /></div><h4 style="text-align: left;"> Exec Bash</h4><div> docker exec -it <container> /bin/bash</div><div><br /></div><h4 style="text-align: left;">Checking History</h4><div><div>docker history <container></div></div><div><br /></div><h4 style="text-align: left;">Low-level information</h4><div>docker inspect <container></div><div><br /></div><h4 style="text-align: left;">Copy Files</h4><div>docker cp file.txt <container>:/tmp</div><div><br /></div><h4 style="text-align: left;">Own Docker Images</h4><div>docker commit <container></div><div><br /></div>docker build <dockerfile></div><div><br /></div><div><h4 style="text-align: left;">List Service </h4><div>docker service ls </div><div><br /></div><h4 style="text-align: left;">Update Service </h4><div><br /></div><div>docker service update <service_name></div><div><br /></div><h4 style="text-align: left;">List Stack</h4><div>docker stack ls</div><div><br /></div><div><h4>Remove Stack</h4></div><div><div>docker stack rm <stack></div><div><br /></div><h4 style="text-align: left;">Deploy Stack </h4><div>docker stack deploy -c <docker-stack.yml> <stack></div></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div></div>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-71397310008008847472021-04-19T12:55:00.004+02:002021-05-04T11:48:43.424+02:00Using MkDocs with git on Windows and Linux<br /> <br />MkDocs is static site generator.<div><br /></div><div><h2 style="text-align: left;">Windows </h2>choco install python<br />choco install pip</div><div><br /></div><div><p>set https_proxy=http://localhost:3128</p>pip install --upgrade pip --user<br /><br />pip install mkdocs</div><div>setx PATH "%PATH%;C:\Users\<span class="pun" style="box-sizing: border-box; color: #00fae0; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px;">%</span><span class="pln" style="box-sizing: border-box; color: #00fae0; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px;">USERNAME</span><span class="pun" style="box-sizing: border-box; color: #00fae0; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px;">%</span>\AppData\Roaming\Python\Python39\Scripts"</div><div><br /></div><div><br /></div><div>cd git _folder</div><div>mkdir docs</div><div>notepad mkdocs.yml</div><div><div>site_name: My Docs</div><div>nav:</div><div> - Home: readme.md</div><div>theme: readthedocs</div></div><div><br /></div><div><br /></div><div>mkdocs build --clean</div><div><br /></div><div><br /></div><div>git commit -a -m "mkdocs updates"</div><div><br /></div><div>git push</div><div><br /></div><h2 style="text-align: left;">Linux</h2><div><div style="background-color: white; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div>sudo su</div><div>export HTTPS_PROXY=http://localhost:3128</div><div>pip3 install mkdocs</div><br /><div>pip3 install docker-compose</div><div><br /></div><div><div>cd git _folder</div><div><br /></div><div>mkdir docs</div><div><br /></div><div>echo -e "</div><div>site_name: My Docs</div><div>nav:</div><div><div> - Home: readme.md</div><div>theme: readthedocs" >mkdocs.yml</div></div><div><br /></div><div>echo -e "# test" > docs/readme.md</div><div><br /></div><div>mkdocs build --clean</div><div><br /></div><div>git commit -a -m "mkdocs updates"</div><div><br /></div><div>git push</div><div><br style="font-family: "Times New Roman"; font-size: medium; white-space: normal;" /></div></div></div></div>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-88379710618712491122020-09-08T13:27:00.012+02:002022-09-01T14:04:37.974+02:00Kubernetes command<pre>
<code>
# Rancher
kubectl get -n cattle-system pods
kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}{{"\n"}}'
kubectl -n cattle-system logs -f $(kubectl -n cattle-system get pods | grep ^rancher | head -n 1 | awk '{ print $1 }')
kubectl delete namespace cattle-system
# Pods
kubectl get pods --show-labels
kubectl describe pod -l app=app1
kubectl exec deploy/app1 -- hostname
kubectl exec deploy/app1 -- killall5
kubectl get pods
kubectl delete pods -l app=app1
# Deployment
kubectl apply -f file.yaml
kubectl apply -f web/
# Services
kubectl get svc
kubectl get pods -l app=web
kubectl logs -l app=web
kubectl get svc web
# Execute
kubectl exec deploy/app1 -- nslookup web
kubectl exec deploy/app1 -- curl http://web:8080
# Output
kubectl get svc bb-web -o jsonpath='{}'
kubectl get svc bb-web -o jsonpath='http://{.status.loadBalancer.ingress[0].*}:8080'
# Endpoint
kubectl get endpoints
kubectl get all -l demo=workshop1
kubectl delete all -l demo=workshop1
# ConfigMap
kubectl get configmaps -A
kubectl describe configmap ample -n ns
# Container Deployment
kubectl run http --image=docker-http-server:latest --replicas=1
kubectl get deployments
kubectl describe deployment http
kubectl expose deployment http --external-ip="172.17.0.29" --port=8000 --target-port=80
kubectl get svc
# Replication Controller
kubectl create -f redis-master-controller.yaml
kubectl get rc
kubectl get pods
</code>
</pre>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-57262730302655871542020-05-04T16:14:00.005+02:002020-05-18T11:54:47.131+02:00Install Elasticsearch + Kibana ( ELK) on Windows <div>choco install curl -y</div><div>choco install 7zip -y</div><div><br /></div><div>curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-windows-x86_64.zip -o elasticsearch-7.6.2-windows-x86_64.zip</div><div>mkdir "c:/elastic"</div><div>7z x elasticsearch-7.6.2-windows-x86_64.zip -oc:/elastic</div><div>cd c:/elastic/elasticsearch-7.6.2/bin</div><div>elasticsearch-service.bat install</div><div>elasticsearch-service.bat start</div><div>curl http://localhost:9200</div><div>GUI: elasticsearch-service.bat manager</div>
<br />
<br />
choco install nssm<br />
<br />
curl https://artifacts.elastic.co/downloads/kibana/kibana-7.6.2-windows-x86_64.zip -o kibana-7.6.2-windows-x86_64.zip<br />7z x kibana-7.6.2-windows-x86_64.zip -oc:/elastic<br />
nssm install kibana C:\elastic\kibana-7.6.2-windows-x86_64\bin\kibana.bat<br />
sc start kibana<br />
<br />
curl http://localhost:5601Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-77896597292124132020-04-05T15:17:00.000+02:002020-04-05T15:17:13.659+02:00How to verify checksum on a Mac - SHA1, SHA256<br /><h4>
SHA1 checksum</h4>
shasum -a 1 file<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
SHA256 checksum</h4>
shasum -a 256 file<br /><div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-60476952995046156612020-04-04T13:59:00.000+02:002020-04-06T11:21:23.326+02:00Installing Grafana on Windows<h4>
install</h4>
choco install grafana<br />
<br />
<h4>
Config</h4>
copy c:\ProgramData\chocolatey\lib\grafana\tools\grafana-6.3.6\conf\defaults.ini c:\ProgramData\chocolatey\lib\grafana\tools\grafana-6.3.6\conf\custom.ini<br />
<br />
"C:\Program Files\Notepad++\notepad++.exe" c:\ProgramData\chocolatey\lib\grafana\tools\grafana-6.3.6\conf\custom.ini<br />
<br />
http_port = 8080<br />
<h4>
Windows Service </h4>
choco install nssm<br />
nssm install grafana c:\ProgramData\chocolatey\lib\grafana\tools\grafana-6.3.6\bin\grafana-server.exe<br />
sc start grafana<br />
<br />
Config Grafana<br />
Configuration - Data Source - name : telegraf - url: http://localhost:8086<br />
Dashboard - Import - <a href="https://grafana.com/grafana/dashboards/1902">https://grafana.com/grafana/dashboards/1902</a><br />
<br />
<h4>
Install Telegraf</h4>
choco install telegraf<br />
"C:\Program Files\Notepad++\notepad++.exe" C:\Program Files\telegraf\telegraf.conf<br />
url: http://localhost:8086<br />
database: telegraf<br />
<br />
sc start telegraf<br />
<br />Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-44464606567990672522020-04-04T12:11:00.000+02:002020-04-04T16:20:39.473+02:00Installing InfluxDB on Windows<h4>
install</h4>
choco install influxdb<br />
<br />
<br />
"C:\Program Files\Notepad++\notepad++.exe" C:\influxdata\influxdb-1.7.10-1\influxdb.conf<br />
<h4>
Storage</h4>
<h4>
<span style="font-weight: normal;">dir = "C:/influxdata/storage/meta"<br />dir = "C:/influxdata/storage/data"<br /> wal-dir = "C:/influxdata/storage/wal"</span></h4>
<h4>
logging</h4>
logging-enabled = true<br />
<div>
trace-logging-enabled = false </div>
<div>
query-log-enabled = true</div>
<br />
<h4>
HTTP endpoint</h4>
[http]<br />
<div>
enabled = true</div>
<div>
<br /></div>
<div>
c:\influxdata\influxdb-1.7.10-1/influxd.exe -config influxdb.conf</div>
<div>
<a href="http://localhost:8086/query" style="background-color: white; color: #1c95de; font-family: Merriweather, serif; font-size: 18px; letter-spacing: 0.1px; text-decoration-line: none; transition: color 0.3s ease 0s;">http://localhost:8086/query</a></div>
<div>
<br /></div>
<h4>
Windows Service </h4>
choco install nssm<br />
nssm install influxdb c:\influxdata\influxdb-1.7.10-1\influxd.exe "-config c:\influxdata\influxdb-1.7.10-1\influxdb.conf"<br />
sc start influxdbUnknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-74558794847116355282020-04-03T10:23:00.002+02:002020-04-04T17:43:38.566+02:00Installing JMeter on Windows with Influxdb and Grafana <br />
<h4>
install</h4>
choco install jmeter<br />
<br />
<h4>
Config JMeter</h4>
download:https://github.com/NovatecConsulting/JMeter-InfluxDB-Writer/releases/download/v-1.2/JMeter-InfluxDB-Writer-plugin-1.2.jar<br />
copy to: c:\ProgramData\chocolatey\lib\jmeter\tools\apache-jmeter-5.2.1\lib\ext\<br />
<br />
<h4>
Config InfluxDB</h4>
<span style="font-family: times;">c:\influxdata\influxdb-1.7.10-1/influx.exe</span><br />
CREATE DATABASE jmeter<br />
SHOW DATABASES<br />
<div>
<br /></div>
<h4>
Config Grafana</h4>
<div>
Configuration - Data Source - name : jmeter - url: http://localhost:8086<br />
Dashboard - Import -https://grafana.com/grafana/dashboards/5496<br />
<br />
<br />
<h4>
Config Test</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnQghVLt9gmuvJTTPRnWe0sM3OzHr7wWir927x52MNN_-icqNZeIA3NrhOGgaIYJGCrvo_e7islVsEjvpB1MdRdbF0JGz2rySo-uwdFna7BgaUAt3a-HSS0xVNgoTI_D4XT3LZJvs22Qc/s1600/Bildschirmfoto+2020-04-04+um+17.42.20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="579" data-original-width="1600" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnQghVLt9gmuvJTTPRnWe0sM3OzHr7wWir927x52MNN_-icqNZeIA3NrhOGgaIYJGCrvo_e7islVsEjvpB1MdRdbF0JGz2rySo-uwdFna7BgaUAt3a-HSS0xVNgoTI_D4XT3LZJvs22Qc/s640/Bildschirmfoto+2020-04-04+um+17.42.20.png" width="640" /></a></div>
<br /></div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-70494803616782440342020-04-02T11:06:00.002+02:002020-04-02T11:06:38.580+02:00Ansible<br />
<h2>
Adhoc</h2>
<h3>
Lookup</h3>
ansible -m debug localhost -a msg="{{ lookup('url', 'http://localhost:8090/nslookup?host=blog.hilandco.com') }}"Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-53702084814220514372020-04-02T11:02:00.000+02:002020-04-02T11:02:10.656+02:00Docker shell2http nslookup<br />
Dockerfile<br />
<br />
FROM shell2http:bind-tools<br />
RUN apk --no-cache add bind-tools<br />
<br />
<br />
docker-compose.yml<br />
<br />
version: '2'<br />
services:<br />
nslookup_api:<br />
image: shell2http:bind-tools<br />
ports:<br />
- "8090:8080"<br />
restart: unless-stopped<br />
command: [ "-form", "/nslookup", "nslookup -q=A $$v_host | tail -2 | head -1 | awk '{print $$2\" \" $$3\" \" $$4}'" ]<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
Test</div>
<div>
curl localhost:8090/nslookup?host=blog.hilandco.com</div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-21508545810192280052020-02-28T13:20:00.002+01:002020-02-28T13:20:48.104+01:00Docker Oracle <a href="https://www.doag.org/formes/pubfiles/9483095/2017-MW-Razvan_Anghel-Docker_for_Developers-Manuskript.pdf"><b>https://www.doag.org/formes/pubfiles/9483095/2017-MW-Razvan_Anghel-Docker_for_Developers-Manuskript.pdf</b></a><br />
<br />
<br />
<br />
<h4 style="background-color: white; box-sizing: border-box; break-after: avoid; break-inside: avoid; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; line-height: 1.25; margin-bottom: 0px !important; margin-top: 24px;">
<a href="https://www.doag.org/formes/pubfiles/9483217/2017-MW-Thomas_Robert-Docker_Container_fuer_das_Deployment_eines_WebLogic_Clusters-Manuskript.pdf" style="background-color: transparent; box-sizing: border-box; color: #0366d6; text-decoration-line: none;">https://www.doag.org/formes/pubfiles/9483217/2017-MW-Thomas_Robert-Docker_Container_fuer_das_Deployment_eines_WebLogic_Clusters-Manuskript.pdf</a></h4>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-22381435222688241322020-02-03T16:08:00.001+01:002020-02-03T16:08:28.671+01:00enable hyper-v on windows 2109<pre style="background-color: rgba(0, 0, 0, 0.01); border: 1px solid rgba(51, 51, 51, 0.1); box-sizing: inherit; color: #333333; font-family: Inconsolata, monospace; font-size: 15px; line-height: 1.2; margin-bottom: 1.6em; max-width: 100%; outline: 0px; overflow: auto; padding: 0.8em; vertical-align: baseline; white-space: pre-wrap;">Enable-WindowsOptionalFeature –Online -FeatureName Microsoft-Hyper-V –All -NoRestart
Install-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature
Install-WindowsFeature RSAT-Clustering -IncludeAllSubFeature
Install-WindowsFeature Multipath-IO
<span style="border: 0px; box-sizing: inherit; color: black; font-family: inherit; font-size: small; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Restart-Computer</span></pre>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-56024146368324991252020-01-30T11:12:00.004+01:002020-01-30T11:12:31.801+01:00Code Documentation Desktop Apps & Web Sites<br />
<div>
DevDocs — <a href="http://devdocs.io/">http://devdocs.io/</a></div>
<br />Zeal — <a href="https://zealdocs.org/">https://zealdocs.org/</a><br /><br /> Dashapp — <a href="https://kapeli.com/dash">https://kapeli.com/dash</a><div>
<br /></div>
<div>
<br /></div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-29479693548036498012020-01-23T16:15:00.002+01:002020-01-23T16:15:45.630+01:00Install AWXyum install -y git<br />
<br />
mkdir ansible<br />
cd ansible/<br />
export http_proxy=http://<proxy>:3128<br />
export https_proxy=http://<proxy>:3128<br />
export HTTP_PROXY=http://<proxy>:3128<br />
export HTTPS_PROXY=http://<proxy>:3128<br />
git clone https://github.com/ansible/awx.git<br />
cd awx/installer/<br />
<br />
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm<br />
yum install -y ansible<br />
yum install -y python-pip python-devel gcc<br />
pip install --upgrade pip<br />
<br />
pip uninstall docker docker-py docker-compose<br />
pip install docker-compose<br />
<br />
ansible-playbook -i inventory install.yml<br />
<br />
<h2>
URL</h2>
http://<awx_server>/#/home<br />
<br />
<h2>
Rest API Call</h2>
<br />
http://<awx_server>/api/v2/job_templates/33/launch/<br />
<br />
Launching from Job Templates via the API follows the following workflow:<br />
GET https://your.tower.server/api/v2/job_templates/&lt;your job template id>/launch/Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-61354547752805585702020-01-23T15:48:00.005+01:002020-05-18T11:05:26.505+02:00Chocolatey Windows package management<h2>
<br /></h2>
<h2>
Install Chocolatey</h2>
cmd as Admin<br />
@powershell -NoProfile -ExecutionPolicy Unrestricted -Command "[Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultCredentials; iex ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1’))” && SET PATH=%PATH%;%systemdrive%\chocolatey\bin<div><br /></div><div>OR</div><div><br /></div><div>cmd as Admin</div><div>@powershell -NoProfile Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))<br />
<div>
<br />
<h2>
Install Apps</h2>
<a href="https://www.blogger.com/null"></a>
<br />
Cmd as Admin<br />
<h4>
Default</h4>
choco install -y notepadplusplus<br />
choco install -y googlechrome<br />
choco install -y firefox<br />
choco install -y adobereader<br />
choco install -y totalcommander<br />
<div>
choco install -y irfanview</div>
<div>
choco install 7zip -y</div>
<div>
choco install sysinternals -y</div>
<h4>
</h4>
<h4>
Development </h4>
<br />
choco install -y vscode<br />
choco install -y svn<br />
choco install -y virtualboxchoco install -y vagrant<br />
choco install keepass -y<br />
<div>
choco install curl -y</div>
choco install git -y<br />
choco install postman -y</div>
<div>
choco install fiddler -y<br />
choco install terraform -y<br />
choco install git.install -y</div>
<h4>
Mircosoft</h4>
<div>
<br />
choco install Office365ProPlus -y<br />
choco install microsoft-teams -y<br />
choco install skype -y<br />
choco install powerbi -y</div>
<div>
<br /></div>
<div>
<h4>
Azure</h4>
choco install azure-cli -y<br />
choco install azcopy -y<br />
choco install azure-data-studio -y</div>
<div>
<br /></div>
<div>
<h4>
Server Software</h4>
</div>
<div>
choco install nodejs -y<br />
<br />
<br />
<br />
<br />
<br />
<article class="post" id="post0" style="border-bottom: 2px solid rgba(164, 196, 7, 0.5); border-radius: 0px; box-shadow: none; box-sizing: border-box; float: left; margin-bottom: 20px; width: 750px;"><section class="post-body text" style="border-radius: 0px; box-sizing: border-box;"><div style="background-color: white; border-radius: 0px; box-sizing: border-box; margin-bottom: 10px;">
<span style="color: #505050; font-family: fontsegeoui;"><span style="font-size: 14px;">choco install elasticsearch -y</span></span><br />
<span style="color: #505050; font-family: fontsegeoui;"><span style="font-size: 14px;"><br /></span></span></div>
<h4>
Proxy</h4>
<div>
cntlm -u <user>@<domain> -H<br />
<br /></div>
<h4 style="background-color: white; border-radius: 0px; box-sizing: border-box; color: #505050; font-family: fontawesome, sans-serif; font-size: 1.47em; font-weight: 300; line-height: 45px; margin: 2px 0px 5px; padding: 2px 0px;">
Upgrading software</h4>
<div style="border-radius: 0px; box-sizing: border-box; margin-bottom: 10px;">
choco upgrade <packagename>.<br />
<br />
mklink /D azure "G:\My Drive\azure"</div>
</section></article><br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
</div>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-17080017613259424112020-01-16T13:19:00.003+01:002020-01-17T10:56:34.526+01:00Install Portainerdocker volume create portainer_data<br />
docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer<br />
<br />
<h2>
in case of proxy restriction</h2>
<div>
<br /></div>
<div>
docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer --env HTTPS_PROXY="http://localhost:3129" --env HTTP_PROXY="http://localhost:3129"</div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-38046567265488840182020-01-08T12:42:00.002+01:002020-08-25T16:58:18.992+02:00How to install Docker CE (community edition): on RHEL 7<h2>
install steps</h2>
yum remove docker docker-common docker-selinux docker-engine<br />
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo<br />
yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm<br />
yum install docker-ce<br />
groupadd docker<br />
usermod -aG docker $USER<br />
systemctl enable docker<br />
systemctl start docker<br />
<ul>
</ul>
<div>
<br />
<h2>
install docker-compose</h2>
yum install -y <a class="external" href="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm">https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm</a><br />
yum install -y python-pip python-devel gcc<br />
pip install --upgrade pip<br />
pip uninstall docker docker-py docker-compose<br />
pip install docker-compose<br />
<br />
<br />
<h2>
test docker </h2>
docker run hello-world</div>
<h2>
in case of update </h2>
cd /var/lib/docker/containers<br />
sed -i "s/docker-runc//g" $(grep -rl "docker-run")<br />
systemctl restart docker<br />
<div>
<div>
<br /></div>
</div>
<div>
<h2>
in case of conflict with existing network</h2>
vi /etc/docker/daemon.json<br />
{</div><div><div style="background-color: white; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div>"data-root": "/data01/docker/",</div><div></div></div> "bip": "<a href="http://192.168.200.5/24">192.168.200.5/24</a>", <br />
"default-address-pools": [ {"base":"<a href="http://192.168.201.0/24">192.168.201.0/24</a>","size":28} ],</div><div><span style="background-color: white; font-family: Consolas, "Courier New", monospace; font-size: 14px; white-space: pre;">"insecure-registries":</span><span style="background-color: white; font-family: Consolas, "Courier New", monospace; font-size: 14px; white-space: pre;">[</span><span style="background-color: white; color: #a31515; font-family: Consolas, "Courier New", monospace; font-size: 14px; white-space: pre;">"host1:5000"</span><span style="background-color: white; font-family: Consolas, "Courier New", monospace; font-size: 14px; white-space: pre;">]</span> <br />
}<br />
<br />
systemctl daemon-reload<br />
systemctl restart docker<br />
<br />
<br />
<h2>
in case of proxy restriction</h2>
mkdir -p /etc/systemd/system/docker.service.d<br />
<br />
vi /etc/systemd/system/docker.service.d/http-proxy.conf<br />
<br />
[Service]<br />
Environment="HTTP_PROXY=http://localhost:3129/"<br />
Environment="HTTPS_PROXY=http://localhost:3129/"</div><div><div style="background-color: white; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div>Environment="NO_PROXY=localhost,127.0.0.1,172.17.0.1,172.30.1.1,host01"</div><br /></div>
systemctl daemon-reload<br />systemctl restart docker<br />
<h2> How do I enable the remote API for dockerd</h2>
<div>
<br /></div>
vi /etc/systemd/system/docker.service.d/startup_options.conf<br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376<br />
<br />
systemctl daemon-reload<br />
systemctl restart docker.service<br />
<br />
<br />
<br /></div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-34273077041449571842019-06-09T13:27:00.001+02:002019-06-09T14:05:42.357+02:00Install and Configure GlusterFS RHEL 7 ( azure <> azure)vi /etc/yum.repos.d/Gluster.repo<br /><br /><div>
[gluster50]<br />name=Gluster 5.0<br />baseurl=http://mirror.centos.org/centos/7/storage/x86_64/gluster-5/<br />gpgcheck=0<br />enabled=1<br /><br />yum install -y glusterfs-server<br />systemctl start glusterd<br />systemctl enable glusterd<br /><br />fdisk /dev/sdd<br />n 1 <br /><br />mkfs.ext4 /dev/sdd1<br />mkdir -p /data/gluster<br />mount /dev/sdd1 /data/gluster<br />echo "/dev/sdd1 /data/gluster ext4 defaults 0 0" | tee --append /etc/fstab</div>
<div>
<br /></div>
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="10.0.0.0/24" accept'<div>
firewall-cmd --reload<br />firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="rhoam02" accept'<br />firewall-cmd --reload<br /><br />gluster peer probe rhoam01.westeurope.cloudapp.azure.com<br />gluster peer probe rhoam02.westeurope.cloudapp.azure.com<br /></div>
<div>
gluster peer status<br />gluster pool list<br /></div>
<div>
mkdir -p /data/gluster/gv0<br />gluster volume create gv0 replica 2 rhoam01:/data/gluster/gv0 rhoam02:/data/gluster/gv0</div>
<div>
gluster volume start gv0<br />gluster volume info gv0<br /><br />mount -t glusterfs rhoam01:/gv0 /mnt<br />mount -t glusterfs rhoam02:/gv0 /mnt<br /><br />echo "rhoam01:/gv0 /mnt glusterfs defaults,_netdev 0 0" | tee --append /etc/fstab<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><br /></span>
<br />
<h2 style="background-color: white; box-sizing: border-box; color: #2b2b2b; font-family: EnzoOT, sans-serif; font-size: 22px; letter-spacing: 0.32px; line-height: 1; margin: 35px 0px 23px; outline: 0px; padding: 0px;">
Sources</h2>
<ul style="background-color: white; box-sizing: border-box; color: #4a5666; letter-spacing: 0.32px; margin: 30px 0px; outline: 0px; padding: 0px 0px 0px 2rem;">
<li style="box-sizing: border-box; color: #2b2b2b; margin: 10px 0px; outline: 0px; padding: 0px 0px 0px 40px;"><div style="box-sizing: border-box; color: #2d2d2d; font-weight: 400; letter-spacing: normal; line-height: 1.3; margin: 0px 0px 13px;">
<span class="post-title" itemprop="headline" style="box-sizing: border-box; font-family: "arial" , "helvetica" , sans-serif;"><a href="https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-and-configure-glusterfs-on-centos-7-rhel-7.html" target="_blank">Install and Configure GlusterFS on CentOS 7 / RHEL 7</a></span></div>
</li>
</ul>
<br />
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><br /></span>
<br />
<div>
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><br /></span></div>
</div>
</div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-78704961730838522762017-01-30T23:21:00.000+01:002017-01-30T23:21:21.722+01:00WLS 12 windows service<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">echo off<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">SETLOCAL<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set DOMAIN_NAME=FRM<u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set USERDOMAIN_HOME=C:\wls\<wbr></wbr>FRM<u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set PRODUCTION_MODE=true<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set JAVA_VENDOR=Sun<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set JAVA_HOME=C:\jvm\jdk1.<wbr></wbr>8.0_112<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set WLS_USER=weblogic<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set WLS_PW=welcome1<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set WL_HOME=C:\frm\<wbr></wbr>wlserver<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set MEM_ARGS=-Xms1024m -Xmx2048m<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">call "%USERDOMAIN_HOME%\bin\<wbr></wbr>setDomainEnv.cmd"<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set SERVER_NAME=ADM_01_FRM<u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">call "%WL_HOME%\server\bin\<wbr></wbr>installSvc.cmd"<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set SERVER_NAME=MNG_01_FRM<u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">set ADMIN_URL=<a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://localhost:7111&source=gmail&ust=1485898922694000&usg=AFQjCNFqKE82MiZCWlaQ10giSaSuv29Siw" href="http://localhost:7111/" style="color: #1155cc;" target="_blank">http://localhost:<wbr></wbr>7111</a><u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span lang="DE-CH" style="font-family: Arial, sans-serif; font-size: 10pt;">call "%WL_HOME%\server\bin\<wbr></wbr>installSvc.cmd"<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span lang="DE-CH" style="font-family: Arial, sans-serif; font-size: 10pt;">ENDLOCAL</span></div>
<span class="J-J5-Ji" id=":fq" style="background-color: white; color: #222222; display: inline-block; font-family: arial, sans-serif; font-size: 17.6px; position: relative;"></span><br />
<div aria-label="Important mainly because of the people in the conversation." class="pG" data-tooltip-align="b,l" data-tooltip-contained="true" data-tooltip-delay="1500" id=":jv" role="img" style="cursor: pointer; display: inline-block; font-size: 0px; height: 19px; margin-bottom: -4px; margin-right: 13px; padding: 0px 7px 0px 10px; width: 19px;">
</div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-9072708309841509922017-01-30T23:18:00.002+01:002017-01-30T23:18:40.270+01:00JVM Delays Caused by Random Number Generation /dev/random<div class="MsoNormal" style="background: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; margin-bottom: 12pt; margin-left: 36pt; margin-right: 0cm; text-indent: 0cm;">
<span lang="EN-US" style="color: black; font-family: Verdana, sans-serif; font-size: 9.5pt;">1.<span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><u></u><span lang="EN-US" style="color: black; font-family: Verdana, sans-serif; font-size: 9.5pt;">Open the </span><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10pt;">$JAVA_HOME/jre/lib/<wbr></wbr>security/java.security</span><span lang="EN-US" style="color: black; font-family: Verdana, sans-serif; font-size: 9.5pt;"> file in a text editor.<u></u><u></u></span></div>
<div class="MsoNormal" style="background: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; margin-bottom: 12pt; margin-left: 36pt; margin-right: 0cm; text-indent: 0cm;">
<a href="https://www.blogger.com/null" name="m_7689631031226914584_wp1047607"></a><u></u><span style="color: black; font-family: Verdana, sans-serif; font-size: 9.5pt;">2.<span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><u></u><span style="color: black; font-family: Verdana, sans-serif; font-size: 9.5pt;">Change the line:<u></u><u></u></span></div>
<div class="MsoNormal" style="background: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; margin-bottom: 12pt; margin-left: 36pt; margin-right: 0cm;">
<a href="https://www.blogger.com/null" name="m_7689631031226914584_wp1047608"></a><span style="color: black; font-family: "Courier New"; font-size: 10pt;">securerandom.source=file:/dev/<wbr></wbr>random<u></u><u></u></span></div>
<div class="MsoNormal" style="background: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; margin-bottom: 13.8pt; margin-left: 36pt; margin-right: 10.8pt;">
<a href="https://www.blogger.com/null" name="m_7689631031226914584_wp1047616"></a><span style="color: black; font-family: Verdana, sans-serif; font-size: 10pt;">to:<u></u></span></div>
<div class="MsoNormal" style="background: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; margin-bottom: 12pt; margin-left: 36pt; margin-right: 0cm;">
<a href="https://www.blogger.com/null" name="m_7689631031226914584_wp1047615"></a><span style="color: black; font-family: "Courier New"; font-size: 10pt;">securerandom.source=file:/dev/<wbr></wbr>urandom</span></div>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2237106966128176554.post-56414274841296503292017-01-30T23:14:00.008+01:002021-03-17T15:20:45.491+01:00Oracle Reports 12.1 / 12.2 /19<h3 style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; text-align: left;"><span face="Arial, sans-serif" style="font-size: 10pt;">Url for Test Report </span></h3><div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"><span face="Arial, sans-serif" style="font-size: 10pt;"><br /></span></div><div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span face="Arial, sans-serif" style="font-size: 10pt;">http://localhost:9001/<wbr></wbr>reports/rwservlet?server=rpt01+report=blank_<wbr></wbr>template.jsp+desformat=html+<wbr></wbr>DESTYPE=cache<u></u><u></u></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div><div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"><br /></div><h2 style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; text-align: left;">Start Stop Create Reports Server Instance </h2><div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"><br /></div><div class="MsoNormal" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">cd %DOMAIN_HOME%\bin\</div><div class="MsoNormal" style="background-color: white;"><h3 style="text-align: left;"><span face="arial, sans-serif" style="color: #222222; font-size: 12.8px;">setUserOverridesLate.cmd</span></h3><div><span face="arial, sans-serif" style="color: #222222; font-size: 12.8px;">set WLS_USER=weblogic</span></div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set WLS_USER_PWD=welcome1</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set WLS_URL=t3://weblogic:7001/</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set DOMAIN_NAME=FRM_SH_Dx03</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set DOMAIN_HOME=C:\\appl\\wls\\FRM_DOM</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set NM_NAME=AdminServerMachine</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set NM_URL=weblogic.host</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set NM_PORT=5556</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set RPT_PORT=9002</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set RPT_HOST=weblogic.host</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">set REPORTSSERVER_LIST=RPT_01,RP_02</div><div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"><br /></div><h3 style="text-align: left;"><span face="arial, sans-serif" style="color: #222222;"><span style="font-size: 12.8px;">create_ReportsServerInstance.cmd</span></span></h3><div><span face="arial, sans-serif" style="color: #222222;"><div><span style="font-size: 12.8px;">call </span><span style="font-size: 12.8px;">%DOMAIN_HOME%</span><span style="font-size: 12.8px;">\bin\setDomainEnv.cmd</span></div><div><span style="font-size: 12.8px;">cd C:\appl\wls\%DOMAIN_HOME%\bin\</span></div><div><span style="font-size: 12.8px;">@echo off</span></div><div><span style="font-size: 12.8px;">for %%a in ("%REPORTSSERVER_LIST:,=" "%") do (</span></div><div><span style="font-size: 12.8px;"> echo %%~a</span></div><div><span style="font-size: 12.8px;"><span style="white-space: pre;"> </span>set RPT_PREFIX=%%~a</span></div><div><span style="font-size: 12.8px;"> /opt/ora/frm/oracle_common/common/bin/wlst.cmd </span><span style="font-size: 12.8px;">%DOMAIN_HOME%</span><span style="font-size: 12.8px;">\bin\create_ReportsServerInstance.py</span></div><div><span style="font-size: 12.8px;">)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><h3 style="text-align: left;"><span style="font-size: 12.8px;">create_ReportsServerInstance.py</span></h3><div><div><span style="font-size: 12.8px;">#!/opt/ora/product/frm/oracle_common/common/bin/wlst.sh</span></div><div><span style="font-size: 12.8px;">import os, sys</span></div><div><span style="font-size: 12.8px;">try: </span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_USER"]</span></div><div><span style="font-size: 12.8px;">except KeyError: </span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_USER"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_USER_PWD"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_USER_PWD"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_URL"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_URL"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["DOMAIN_NAME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable DOMAIN_NAME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["NM_NAME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable NM_NAME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["RPT_PREFIX"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable RPT_PREFIX"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">vWlsUser=os.environ['WLS_USER']</span></div><div><span style="font-size: 12.8px;">vWlsUserPWd=os.environ["WLS_USER_PWD"]</span></div><div><span style="font-size: 12.8px;">vWlsUrl=os.environ["WLS_URL"]</span></div><div><span style="font-size: 12.8px;">vInstanceName=os.environ["RPT_PREFIX"]</span></div><div><span style="font-size: 12.8px;">vMachine=os.environ["NM_NAME"]</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">connect(vWlsUser, vWlsUserPWd, vWlsUrl )</span></div><div><span style="font-size: 12.8px;">createReportsServerInstance(instanceName=vInstanceName,machine=vMachine)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><h3 style="text-align: left;"><span style="font-size: 12.8px;">delete_ReportsServerInstance.cmd</span></h3><div><div><span style="font-size: 12.8px;">call </span><span style="font-size: 12.8px;">%DOMAIN_HOME%</span><span style="font-size: 12.8px;">\bin\setDomainEnv.cmd</span></div><div><span style="font-size: 12.8px;">cd %DOMAIN_HOME%\bin\</span></div><div><span style="font-size: 12.8px;">@echo off</span></div><div><span style="font-size: 12.8px;">for %%a in ("%REPORTSSERVER_LIST:,=" "%") do (</span></div><div><span style="font-size: 12.8px;"> echo %%~a</span></div><div><span style="font-size: 12.8px;"><span style="white-space: pre;"> </span>set RPT_PREFIX=%%~a</span></div><div><span style="font-size: 12.8px;"> /opt/ora/frm/oracle_common/common/bin/wlst.cmd </span><span style="font-size: 12.8px;">%DOMAIN_HOME%</span><span style="font-size: 12.8px;">\bin\delete_ReportsServerInstance.py</span></div><div><span style="font-size: 12.8px;">)</span></div><div style="font-size: 12.8px;"><br /></div></div><h3 style="text-align: left;"><span style="font-size: 12.8px;">delete_ReportsServerInstance.py</span></h3><div><span style="font-size: 12.8px;"><br /></span></div><div><div><span style="font-size: 12.8px;">#!/opt/ora/product/frm/oracle_common/common/bin/wlst.sh</span></div><div><span style="font-size: 12.8px;">import os, sys</span></div><div><span style="font-size: 12.8px;">try: </span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_USER"]</span></div><div><span style="font-size: 12.8px;">except KeyError: </span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_USER"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_USER_PWD"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_USER_PWD"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_URL"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_URL"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["DOMAIN_NAME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable DOMAIN_NAME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["NM_NAME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable NM_NAME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["RPT_PREFIX"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable RPT_PREFIX"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">vWlsUser=os.environ['WLS_USER']</span></div><div><span style="font-size: 12.8px;">vWlsUserPWd=os.environ["WLS_USER_PWD"]</span></div><div><span style="font-size: 12.8px;">vWlsUrl=os.environ["WLS_URL"]</span></div><div><span style="font-size: 12.8px;">vInstanceName=os.environ["RPT_PREFIX"]</span></div><div><span style="font-size: 12.8px;">vMachine=os.environ["NM_NAME"]</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">connect(vWlsUser, vWlsUserPWd, vWlsUrl )</span></div><div><span style="font-size: 12.8px;">deleteReportsServerInstance(instanceName=vInstanceName,machine=vMachine)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><h3 style="text-align: left;"><span style="font-size: 12.8px;">startReportsServerInstance.cmd</span></h3><div><div style="font-size: 12.8px;">call %DOMAIN_HOME%\bin\setDomainEnv.cmd</div><div style="font-size: 12.8px;">cd %DOMAIN_HOME%\bin\</div><div style="font-size: 12.8px;">/opt/ora/frm/oracle_common/common/bin/wlst.cmd %DOMAIN_HOME%\bin\startReportsServerInstance.py</div><div style="font-size: 12.8px;"><br /></div><h3 style="text-align: left;"><span style="font-size: 12.8px;">startReportsServerInstance.py</span></h3><div style="font-size: 12.8px;"><br /></div><div><div><span style="font-size: 12.8px;">#!/opt/ora/product/frm/oracle_common/common/bin/wlst.sh</span></div><div><span style="font-size: 12.8px;">import os, sys</span></div><div><span style="font-size: 12.8px;">try: </span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_USER"]</span></div><div><span style="font-size: 12.8px;">except KeyError: </span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_USER"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_USER_PWD"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_USER_PWD"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_URL"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_URL"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["DOMAIN_NAME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable DOMAIN_NAME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"> </span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["NM_NAME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable NM_NAME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["NM_URL"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable NM_URL"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"> </span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["NM_PORT"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable NM_PORT"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["DOMAIN_HOME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable DOMAIN_HOME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["REPORTSSERVER_LIST"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable REPORTSSERVER_LIST"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"> </span></div><div><span style="font-size: 12.8px;">vWlsUser=os.environ['WLS_USER']</span></div><div><span style="font-size: 12.8px;">vWlsUserPWd=os.environ["WLS_USER_PWD"]</span></div><div><span style="font-size: 12.8px;">vWlsUrl=os.environ["WLS_URL"]</span></div><div><span style="font-size: 12.8px;">vMachine=os.environ["NM_NAME"]</span></div><div><span style="font-size: 12.8px;">vNmUrl=os.environ["NM_URL"]</span></div><div><span style="font-size: 12.8px;">vNmPort=os.environ["NM_PORT"]</span></div><div><span style="font-size: 12.8px;">vDomain=os.environ["DOMAIN_NAME"]</span></div><div><span style="font-size: 12.8px;">vDomainHome=os.environ["DOMAIN_HOME"]</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">nmConnect(vWlsUser, vWlsUserPWd, vNmUrl ,vNmPort,vDomain,vDomainHome,'ssl')</span></div><div><span style="font-size: 12.8px;">for i in os.environ.get("REPORTSSERVER_LIST").split(","):</span></div><div><span style="font-size: 12.8px;"> try:<span style="white-space: pre;"> </span></span></div><div><span style="font-size: 12.8px;"><span style="white-space: pre;"> </span>nmStart(serverName=i,serverType='ReportsServerComponent')</span></div><div><span style="font-size: 12.8px;"> except:</span></div><div><span style="font-size: 12.8px;"><span style="white-space: pre;"> </span>pass</span></div><div><span style="font-size: 12.8px;"><br /></span></div><h3 style="text-align: left;"><span style="font-size: 12.8px;">startReportsServerInstance.cmd</span></h3><div><span style="font-size: 12.8px;"><div>call %DOMAIN_HOME%\bin\setDomainEnv.cmd</div><div>cd %DOMAIN_HOME%\bin\</div><div>/opt/ora/frm/oracle_common/common/bin/wlst.cmd %DOMAIN_HOME%\bin\startReportsServerInstance.py</div><div><br /></div></span></div><h3 style="text-align: left;"><span style="font-size: 12.8px;">stopReportsServerInstance.py</span></h3><div><span style="font-size: 12.8px;"> #!/opt/ora/product/frm/oracle_common/common/bin/wlst.sh</span></div><div><span style="font-size: 12.8px;">import os, sys</span></div><div><span style="font-size: 12.8px;">try: </span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_USER"]</span></div><div><span style="font-size: 12.8px;">except KeyError: </span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_USER"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_USER_PWD"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_USER_PWD"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["WLS_URL"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable WLS_URL"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["DOMAIN_NAME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable DOMAIN_NAME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"> </span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["NM_NAME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable NM_NAME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["NM_URL"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable NM_URL"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"> </span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["NM_PORT"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable NM_PORT"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["DOMAIN_HOME"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable DOMAIN_HOME"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">try:</span></div><div><span style="font-size: 12.8px;"> os.environ["REPORTSSERVER_LIST"]</span></div><div><span style="font-size: 12.8px;">except KeyError:</span></div><div><span style="font-size: 12.8px;"> print "Please set the environment variable REPORTSSERVER_LIST"</span></div><div><span style="font-size: 12.8px;"> sys.exit(1)</span></div><div><span style="font-size: 12.8px;"> </span></div><div><span style="font-size: 12.8px;">vWlsUser=os.environ['WLS_USER']</span></div><div><span style="font-size: 12.8px;">vWlsUserPWd=os.environ["WLS_USER_PWD"]</span></div><div><span style="font-size: 12.8px;">vWlsUrl=os.environ["WLS_URL"]</span></div><div><span style="font-size: 12.8px;">vMachine=os.environ["NM_NAME"]</span></div><div><span style="font-size: 12.8px;">vNmUrl=os.environ["NM_URL"]</span></div><div><span style="font-size: 12.8px;">vNmPort=os.environ["NM_PORT"]</span></div><div><span style="font-size: 12.8px;">vDomain=os.environ["DOMAIN_NAME"]</span></div><div><span style="font-size: 12.8px;">vDomainHome=os.environ["DOMAIN_HOME"]</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;">nmConnect(vWlsUser, vWlsUserPWd, vNmUrl ,vNmPort,vDomain,vDomainHome,'ssl')</span></div><div><span style="font-size: 12.8px;">for i in os.environ.get("REPORTSSERVER_LIST").split(","):</span></div><div><span style="font-size: 12.8px;"> try:<span style="white-space: pre;"> </span></span></div><div><span style="font-size: 12.8px;"><span style="white-space: pre;"> </span>nmKill(serverName=i,serverType='ReportsServerComponent')</span></div><div><span style="font-size: 12.8px;"> except:</span></div><div><span style="font-size: 12.8px;"><span style="white-space: pre;"> </span>pass</span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"> </span></div><h3 style="text-align: left;"><span style="font-size: 12.8px;">showenvReportsServer.cmd</span></h3></div></div><div><span style="font-size: 12.8px;"><div>call %DOMAIN_HOME%</div></span><span style="font-size: 12.8px;"><div>cd %DOMAIN_HOME%\bin\</div><div>set URL=</div><div>@echo off</div><div>for %%a in ("%REPORTSSERVER_LIST:,=" "%") do (</div><div><span style="white-space: pre;"> </span>call "C:\Program Files\Internet Explorer\iexplore.exe" http://%RPT_HOST%:%RPT_PORT%/reports/rwservlet/showenv?server=%%~a</div><div><span style="white-space: pre;"> </span>call "C:\Program Files\Internet Explorer\iexplore.exe" http://%RPT_HOST%:%RPT_PORT%/reports/rwservlet?server=%%~a+report=blank_template.jsp+desformat=html+DESTYPE=cache</div><div>)</div><div><br /></div></span></div><div><span style="font-size: 12.8px;"> </span></div></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"><br /></span></div><div><span style="font-size: 12.8px;"> </span></div></div><div style="font-size: 12.8px;"><br /></div></span></div></div>
Unknownnoreply@blogger.com