This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
app-notes:cumulocity-agent-in-lxc-container [2017/02/08 10:26] – shasha | app-notes:cumulocity-agent-in-lxc-container [2017/02/10 10:19] – [Build the agent] shasha | ||
---|---|---|---|
Line 4: | Line 4: | ||
[[http:// | [[http:// | ||
+ | ====Generate a new SSH public key==== | ||
+ | We need for the agent SSH. We create the key in the lxc container. | ||
+ | <code bash> | ||
+ | ssh-keygen | ||
+ | #The new key | ||
+ | cat / | ||
+ | #cp the key and go to the router and copy the key in this file | ||
+ | vi / | ||
+ | </ | ||
====Build the agent==== | ====Build the agent==== | ||
Now we need to make some installation. | Now we need to make some installation. | ||
Line 36: | Line 45: | ||
cd netmoduleCumulocityAgent | cd netmoduleCumulocityAgent | ||
</ | </ | ||
- | Move the content of **src** | + | Move the content of **src** |
<code bash> | <code bash> | ||
cp src/* sdk_folder/ | cp src/* sdk_folder/ | ||
cp include/* sdk_folder/ | cp include/* sdk_folder/ | ||
+ | #Copy also the srtemplate.txt | ||
+ | cp srtemplate.txt sdk_folder/ | ||
</ | </ | ||
Edit the configfile (c8yAgent.conf) and move it. | Edit the configfile (c8yAgent.conf) and move it. | ||
<code bash> | <code bash> | ||
cp c8yAgent.conf /etc/ | cp c8yAgent.conf /etc/ | ||
+ | </ | ||
+ | Now we can build the agent. | ||
+ | <code bash> | ||
+ | make | ||
+ | |||
+ | #If you want, you can delete all and rebuild again: | ||
+ | make clean | ||
+ | make | ||
+ | </ | ||
+ | Now go to the **src** folder. | ||
+ | <code bash> | ||
+ | make | ||
+ | chmod 775 -R main | ||
+ | </ | ||
+ | <code bash> | ||
+ | ./main | ||
</ | </ |