-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vijay
committed
Jul 5, 2016
1 parent
0bf5953
commit 3f23716
Showing
22 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
![](posts/files/shipped-application-level-policy/assets/comming-soon.png) | ||
# Shipped - Define and Enforce Application-level Policies | ||
|
||
|
||
Application-level polices are rules that monitor your application on a running container. You create these rules to monitor memory management, disk read and write management, task management, network management and load balancing. Alerts are generated when thresholds exceed your specifications. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/1.PNG) | ||
|
||
For this lab, we have created a sample program in golang that intentionally leaked memory. We will define a policy to manage the memory. | ||
|
||
First fork <a href="https://github.com/CiscoCloud/aie-burnit" target="_blank">aie-burnit</a>. When done, contents are copied from CiscoCloud to your public repo. | ||
Click <a href="https://help.github.com/articles/fork-a-repo/#fork-an-example-repository" target="_blank">here</a> to learn how to fork GitHub. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Create a Project and Add Services | ||
|
||
1. Log in to <a href="https://ciscoshipped.io">Shipped UI</a>. | ||
|
||
2. Click **Create New Application**. | ||
|
||
3. Enter your new project name, for example, applicationPolicy, click **Start Composing**. | ||
4. Click **Add an existing repository**, and search for aie-burnit. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/2.PNG) | ||
|
||
1. Click **Save Project** to trigger a build for services that are added. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/3.PNG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## Create Environment | ||
|
||
1. Click <b>New Environment</b>. | ||
1. Enter the name for the environment, Test, for example. | ||
1. Click **Save**. | ||
|
||
## Deploy the Service | ||
|
||
1. Select aie-burnit service from the left side, and choose the environment (Test), then click **Deploy Build**. | ||
Your app started running. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/5.PNG) | ||
|
||
1. Click **Settings** then click **Alerting Thresholds**. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/6.PNG) | ||
|
||
1. Scroll down and click **Add New Policy**. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/7.PNG) | ||
|
||
1. Enter a name for the policy. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/8.PNG) | ||
|
||
1. Select a metric, apply a condition to it, and select an action when the condition is met. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/9.PNG) | ||
|
||
1. Click **Add**. | ||
The policy is added. This policy indicates that when memory use is greater than 75%, then Scale Up the container from 1 to 2. When memory use is greater than 75% within 2 containers, then scale up by another 1 container, that is, from 2 to 3 containers. Scaling up will stop from here because 3 is the maximum container specified. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/10.PNG) | ||
|
||
The following example shows a policy with an alarm condition. When memory use greater than 75%, then trigger the alarm. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/11.PNG) | ||
|
||
You can scale the percentage by moving the green dot in the spiderweb chart as shown. | ||
|
||
![](posts/files/shipped-application-level-policy/assets/12.PNG) | ||
|
||
There are two set of dots, move the inner green dots (highlighted) to set the minimum threshold and the outer green dots (highlighted) to set the maximum threshold value. The values are auto updated as you move these dots | ||
|
||
1. Click **Save** and go back to environment. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## aie-burnit Usage | ||
|
||
We have deployed app up and running on test env. | ||
|
||
![](assets/13.PNG) | ||
|
||
We can specify the no of MB's by which we can start memory leak in app to see how policy response to our app. | ||
|
||
So we are adding 2 and click on update button, once done we will click on resume (it resume app with memory leak.) | ||
|
||
![](assets/14.PNG) | ||
|
||
As we can see memory leak has been increasing. As Memory leak reached 75% of policy, we will get alert, in shipped ui. | ||
|
||
We can see alert under Run page > | ||
|
||
![](assets/15.PNG) | ||
|
||
After reach to threshold we have stopped memory leak and capture the below output. | ||
|
||
![](assets/16.PNG) | ||
|
||
|
||
Below are the related metrics graphs | ||
|
||
![](assets/17.PNG) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.