This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
app-notes:cumulocity-agent-in-lxc-container [2017/02/08 10:37] – shasha | app-notes:cumulocity-agent-in-lxc-container [2017/02/10 12:02] – [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 19: | Line 28: | ||
cd m2m-cumulocity-sdk-c-d627781f3afa | cd m2m-cumulocity-sdk-c-d627781f3afa | ||
</ | </ | ||
- | Create an init.mk file, and define specific macros CPPFLAGS, CXXFLAGS and LDFLAGS, LDLIBS and CXX for cross-compiling. | + | Create an init.mk file, and define specific macros CPPFLAGS, CXXFLAGS and LDFLAGS, LDLIBS and CXX for compiling. |
<code bash> | <code bash> | ||
CXX: | CXX: | ||
Line 31: | Line 40: | ||
cp Makefile.template Makefile | cp Makefile.template Makefile | ||
</ | </ | ||
- | Add the Cumulocity agent to the SDK: | + | Add the Cumulocity agent to the SDK:{{: |
<code bash> | <code bash> | ||
- | tar xvf netmoduleCumulocityAgent.tar | + | tar -xvzf netmodulecumulocityagentlxc.tar.gz |
- | cd netmoduleCumulocityAgent | + | cd netmoduleCumulocityAgentLXC |
</ | </ | ||
Move the content of **src** folder to the **src** folders of the SDK. | Move the content of **src** folder to the **src** folders of the SDK. | ||
Line 58: | Line 67: | ||
<code bash> | <code bash> | ||
make | make | ||
+ | chmod 775 -R main | ||
</ | </ | ||
<code bash> | <code bash> | ||
./main | ./main | ||
</ | </ |