# Chameleon **Repository Path**: heterogeneous_center/Chameleon ## Basic Information - **Project Name**: Chameleon - **Description**: A two-tier “software-defined" resource manager for mobile system-on-chips or cloud clusters. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 4 - **Created**: 2019-09-07 - **Last Updated**: 2022-04-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Chameleon ## installation for Ubuntu 16.04 ### First, make sure the following system requirements are statisfied. ```shell # Update the packages. $ sudo apt-get update # install cmake $ sudo apt-get install -y cmake # Install a few utility tools. $ sudo apt-get install -y tar wget git # Install autotools $ sudo apt-get install -y autoconf libtool automake # Install the dependencies for libprocess. $ sudo apt-get -y install build-essential libcurl4-nss-dev libsasl2-dev libsasl2-modules libapr1-dev libsvn-dev zlib1g-dev iputils-ping glpk-utils libglpk-dev # Install the dependencies for hardware resources collection if on x86_64 architecture $ sudo apt-get -y install dmidecode lshw hdparm cpuid if on Arm architecture $ sudo apt-get -y install dmidecode lshw hdparm ``` ### Second, clone the Chameleon git repository and build Chameleon. ```shell $ git clone https://gitee.com/heterogeneous_center/Chameleon.git/ $ cd Chameleon $ mkdir build && cd build $ cmake .. $ make ``` ## launch Chameleon in a cluster #### set the JAVA_HOME and HADOOP_HOME first! ```shell $ export JAVA_HOME=/usr/local/java/jdk1.8.0_261/ $ export HADOOP_HOME=/home/lemaker/open-source/hadoop-2.7.5 ``` ### master ```shell $ cd ./build/src/master/ $ ./master --supermaster_path=/home/lemaker/open-source/Chameleon/build/src/master/super_master --webui_path=/home/lemaker/open-source/Chameleon/src/webui ``` ### Required Flags | Flag | Explanation |example | | ------ | ------ | ------ | | --webui_path | the absolute path of webui. | For example, --webui=/home/lemaker/open-source/Chameleon/src/webui | ### Optional Flags | Flag | Explanation |example | | ------ | ------ | ------ | | --port | master run on this port, (default 6060 ) | --port=6060 | | --supermaster_path | the absolute path of supermaster executive, default("./super_master") | --supermaster_path=/home/lemaker/open-source/Chameleon/build/src/master/super_master| | --fault_tolerance | whether master has fault tolerance, (default false ) | --fault_tolerance=true | ### slave ```shell cd ./build/src/slave/ $ ./slave --master=172.20.110.236:6060 --ht=555555 ``` ### Required Flags | Flag | Explanation |example | | ------ | ------ | ------ | | --master | the ip:port of master daemon | --master=172.20.110.236:6060 | ### Optional Flags | Flag | Explanation |example | | ------ | ------ | ------ | | --port | the port used by the slave daemon(default 6061) |--port=6061| | --ht | the time interval of heartbeat that slave send a message to master(sec),and the ht must >= 2|--ht=300 ### Example: how to run a spark workload on Chameleon? We use spark PI as an example. ```shell cd ~/open-source/spark-2.3.0-bin-hadoop2.7/ ./bin/spark-submit \ --class org.apache.spark.examples.JavaSparkPi \ --master mesos://172.20.110.78:6060 \ --deploy-mode client \ --supervise \ --executor-memory 600m \ --total-executor-cores 1 \ /home/lemaker/open-source/spark-2.3.0-bin-hadoop2.7/examples/jars/spark-examples_2.11-2.3.0.jar \ 100 ``` ### super_master ```shell $ cd ./build/src/master/ $./super_master --master_path=/home/lemaker/open-source/Chameleon/build/src/master/master --webui=/home/lemaker/open-source/Chameleon/src/webui ``` ### Required Flags | Flag | Explanation |example | | ------ | ------ | ------ | | --master_path | the absolute path of master executive | --master_path=/home/lemaker/open-source/Chameleon/build/src/master/master | | --initiator | the ip:port of the current master of first level or supermaster | --initiator=172.20.110.228:6060 | | --webui_path | the absolute path of webui. | For example, --webui=/home/lemaker/open-source/Chameleon/src/webui | ### webui http://master_URL:6060 #### common commands ps aux | grep master sudo kill -9 `ps -ef|grep "master" |grep -v grep|awk '{print $2}'`