Skip to content

Commit c408776

Browse files
authored
Merge pull request #1 from sliburd/master
Couchbase using ACI
2 parents 596e6cc + 209803d commit c408776

12 files changed

+84
-2
lines changed

README.md

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,85 @@
1-
# azure-container-instances-couchbase
1+
## Couchbase Cluster on Azure Container Instances (ACI)
2+
___
3+
#### What are Azure Container Instances
4+
ACI containers are conceptually similar to pods in Kubernetes. While not truly orchestration, ACI
5+
allows grouping around first-class container objects. The containers within the group can communicate with each other on a private network by default.
6+
External communication is established via a randomly assigned public IP.<br>
7+
It is important to be aware that ACI is in preview and is not for production use.
8+
#### Why use ACI
9+
ACI allows you to easily run containers on Azure with a single command. There is no managing of Virtual
10+
Machines and other infrastructure components. [Billing](https://azure.microsoft.com/en-us/pricing/details/container-instances/)
11+
is at a granularity of the duraction of cores, memory and requests. This is more flexible and accurate than the standard
12+
set VM size approach.
213

3-
Describes how to use Azure Container Instances with Couchbase
14+
#### Prerequisites:
15+
16+
* A Microsoft Azure account. Create an [account](https://azure.microsoft.com/en-us/free/) if required.
17+
18+
The [Azure Cloud Shell](https://docs.microsoft.com/en-us/azure/cloud-shell/limitations) is command-line for this example so that the Azure Portal can be used exclusively.
19+
20+
![Azure Cloud Shell Screenshot](https://github.com/sliburd/azure-container-instances-couchbase/blob/master/screenshots/Azure_Cloud_Shell.PNG)
21+
22+
#### Create a resource group
23+
```
24+
s@Azure:~$ az group create -l eastus -n couchbaseonaciRG
25+
```
26+
After successful creating the resource group the console prints the output:
27+
```
28+
{
29+
"id": "/subscriptions/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX/resourceGroups/couchbaseonaciRG",
30+
"location": "eastus",
31+
"managedBy": null,
32+
"name": "couchbaseonaciRG",
33+
"properties": {
34+
"provisioningState": "Succeeded"
35+
},
36+
"tags": null
37+
}
38+
```
39+
40+
#### Create an ACI using the cloud shell:
41+
![create aci image](https://github.com/sliburd/azure-container-instances-couchbase/blob/master/screenshots/created_ACI_using_command_line_creating_status.PNG)
42+
43+
The provisioningState specifies "*Creating*".<br>
44+
Wait about a minute then execute the container show command to make sure the instance has been provisioned successfully:
45+
46+
```
47+
s@Azure:~$ az container show --name acicbexample -g couchbaseonaciRG
48+
```
49+
Pay attention to the port, IP and provisioningState (should be *"Succeeded"*).
50+
![after creation of aci](https://github.com/sliburd/azure-container-instances-couchbase/blob/master/screenshots/aci_created__port_ip_status.PNG)
51+
52+
We can begin starting the cluster by opening **http://\<IP\>:8091** in a web browser.
53+
54+
![setup](https://github.com/sliburd/azure-container-instances-couchbase/blob/master/screenshots/Couchbase_Setup_page.PNG)
55+
56+
#### Start the cluster via the Web Console:
57+
1. Select "*Start a new cluster*".
58+
2. Set the "*Data RAM Quota*" and "*Index RAM Quota*" to 512 MB.
59+
3. Leave the other fields as the defaults and hit "*Next*".
60+
4. Choose the choose the "beer-sample" bucket and continue to hit "*Next*".
61+
5. Continue to hit "*Next*" following the instructions.
62+
6. On the final step enter a username and password for the administrator account.
63+
![selecting beer-sample](https://github.com/sliburd/azure-container-instances-couchbase/blob/master/screenshots/pick_beer_sample_bucket.PNG)
64+
![final configure](https://github.com/sliburd/azure-container-instances-couchbase/blob/master/screenshots/Final_configure_step.PNG)
65+
66+
The cluster is running, you will notice that you have one active server.
67+
#### Run a query
68+
We will use data from the beer-sample bucket chosen during setup for a N1QL query:
69+
1. Navigate to the "*Query*" tab.
70+
2. Type "select `beer-sample`.* from `beer-sample`;" (without the quotes) in the query text box and hit "*Execute*".
71+
3. Observe the results and explore the different output format tabs.
72+
![query results](https://github.com/sliburd/azure-container-instances-couchbase/blob/master/screenshots/Beer_sample_n1ql_query.PNG)
73+
74+
#### Clean up
75+
Tear-down is simply deleting the container using the command:
76+
77+
```s@Azure:~$ az container delete --name acicbexample --resource-group couchbaseonaciRG --yes```
78+
79+
Now we can do a check that the container is gone by the command:
80+
![container show after delete](https://github.com/sliburd/azure-container-instances-couchbase/blob/master/screenshots/container_show_after_delete.PNG)
81+
The command returned nothing, which indicates the container no longer exists.
82+
83+
That is it! We are finished. Using ACI is that simple and easy.
84+
85+

screenshots/Azure_Cloud_Shell.PNG

2.47 KB
Loading
136 KB
Loading

screenshots/Configure_server.PNG

86.6 KB
Loading
33.2 KB
Loading
36.8 KB
Loading
43.3 KB
Loading
6.44 KB
Loading
43.6 KB
Loading
13.5 KB
Loading

0 commit comments

Comments
 (0)