diff --git a/networking/cnci_agent/scripts/README.md b/networking/cnci_agent/scripts/README.md index f6a2a99b5..cca8406c6 100644 --- a/networking/cnci_agent/scripts/README.md +++ b/networking/cnci_agent/scripts/README.md @@ -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 ``` 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 @@ -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. ``` @@ -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. - diff --git a/networking/cnci_agent/scripts/generate_cnci_cloud_image.sh b/networking/cnci_agent/scripts/generate_cnci_cloud_image.sh index 7cf8ec261..d351602c2 100755 --- a/networking/cnci_agent/scripts/generate_cnci_cloud_image.sh +++ b/networking/cnci_agent/scripts/generate_cnci_cloud_image.sh @@ -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"