Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Networking: ciao-cnci-agent: Updated documentation
Browse files Browse the repository at this point in the history
Updated documentation to reflect usage of the new provisoning
script and image.

Signed-off-by: Manohar Castelino <[email protected]>
  • Loading branch information
mcastelino committed Apr 22, 2016
1 parent 4878e6a commit 13ff220
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
23 changes: 9 additions & 14 deletions networking/cnci_agent/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,34 @@ Helper scripts to provision and test CNCI Images
## CNCI Image Provisioning ##

The CNCI Image creation scripts helps you create a CNCI Image from
a clear linux cloud image. Clear cloud images can be obtained from
a clear linux cloud image. Clear cloud images for the CNCI can be obtained from

https://download.clearlinux.org/image/
https://download.clearlinux.org/demos/ciao/

The scripts are used to provision the image with the CNCI Agent and
the certificates it needs to connect to the ciao-scheduler.

0. The image has to be preprovisoned with the following tools
- dnsmasq
- iptables
1. Place the appropriate certificates under the certs directory

```
├── certs
│   ├── CAcert-server-localhost.pem
│   ├── cert-client-localhost.pem
│   ├── CAcert-*.pem
│   ├── cert-CNCIAgent-*.pem
```


2. Ensure that you have built and installed the cnci agent
2. Ensure that you have built and installed the cnci agent
```
cd $GOPATH/src/github.com/01org/ciao/networking/cnci_agent
go install
```
3. Update the image
```
./update_cnci_cloud_image.sh
./generate_cnci_cloud_image.sh --image <cnci-image>
```

This will yield a provisioned image. This can be used as a CNCI VM.

## CNCI Verification ##
## CNCI Verification (Optional)##

A simple script to launch the CNCI VM using QEMU and a sample cloud-init
configuration. The cloud-init is setup to check if the CNCI Agent can
Expand All @@ -65,7 +61,7 @@ be successfully launched within this VM
3. Verify the successful launch of the CNCI using
systemctl status cnci-agent

An output of the form shown below indicates a successful provisoning of
An output of the form shown below indicates a successful provisioning of
the agent.

```
Expand All @@ -78,6 +74,5 @@ ciao@cncihostname ~ $ systemctl status cnci-agent -l
└─229 /usr/sbin/cnci_agent -server auto -v 3
```

Note: This boot will result in the cloud-init of the image. Hence the orginal
Note: This boot will result in the cloud-init of the image. Hence the original
image generated prior to the verification should be used as the CNCI image.

7 changes: 4 additions & 3 deletions networking/cnci_agent/scripts/generate_cnci_cloud_image.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/bin/bash

#Defaults
image="clear-7370-ciao-networking.img"
image="clear-7520-ciao-networking.img"
certs_dir=$GOPATH/src/github.com/01org/ciao/networking/cnci_agent/scripts/certs
cnci_agent=$GOPATH/bin/cnci_agent
cnci_sysd=$GOPATH/src/github.com/01org/ciao/networking/cnci_agent/scripts/cnci-agent.service
partition="2"

#The image can be downloaded from
#wget https://download.clearlinux.org/demos/ciao/$cnci_xz
#The images can be downloaded from
#curl -O https://download.clearlinux.org/demos/ciao/"$image".xz
#unxz "$image".xz

usage="$(basename "$0") [--image clear_cnci_image_name] [-certs certificate_directory] [-agent cnci_agent_binary] [-script cnci_systemd_script] \n\n A simple script to create a CNCI Image from a clear cloud image. \n Defaults for any unspecified option are as follows \n\n --agent $cnci_agent \n --certs $certs_dir \n --image $image \n --script $cnci_sysd\n\n"

Expand Down

0 comments on commit 13ff220

Please sign in to comment.