WATT is server-based WebAssembly IDE.
If you want to contribute code, please check the contribution guidelines.
- Install MongoDB
- Tizen SDK for building .wgt packages
- Install Tizen SDK
- Install Tizen SDK Native CLI development packages
- For IDE Tizen SDK installer use Tizen Package Manager GUI and install
Native CLI
fromTizen SDK tools
- For CLI Tizen SDK installer use
package-manager-cli.bin
inTIZEN_SDK_PATH/package-manager
./package-manager-cli.bin install NativeCLI
- For IDE Tizen SDK installer use Tizen Package Manager GUI and install
- Add
tizen
CLI-tool to the system PATH in the terminal where you run WATT
export PATH=$PATH:TIZEN_SDK_PATH/tools/ide/bin/
- Getting the sources:
git clone https://github.com/Samsung/WATT.git
cd WATT
- Start the server:
WATT will run some internal executable files,
for this, WATT needs set paths of executable files on System Environment Variable(PATH).
If you don't start the server with launch, WATT could not provide full functionality.
./launch
To run the test suite, first install the dependencies, then run npm test:
npm install
npm test
- Connect to the web server, the service is provided with port number 3000:
On browser, http://localhost:3000/
- Design Editor is located in libs/tau-wysiwig
- After making DE changes launch WATT with bp option
./launch -bp
- After making changes on already running WATT:
# in WATT directory
cd libs/tau-wysiwig
npm install
npm run-script build-watt
- Always after making any DE changes in WATT console:
b
- Install docker-ce (not docker). Follow steps from https://docs.docker.com/install/linux/docker-ce/ubuntu/. Recommended version is 18.06.1
ce3-0~ubuntu. If you are using a newer one give it a try. - Install docker compose. Follow steps from https://docs.docker.com/compose/install/.
- Verify docker installation:
docker run hello-world
- If the following error appears this means you have to add your user to docker group.
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
- If user can not be added due to the following error, manually add your user to docker group, for example, using sudo vigr tool.
usermod: user 'foo' does not exist
- WATT along with mongodb images can be built and run by:
./docker-run.sh
- Ensure 3000 port to be free. You should see logs on terminal:
watt_container_1 | Listening on port 3000
watt_container_1 | TAUComm started
mongo_container_1 | 2019-03-11T07:18:23.178+0000 I NETWORK [thread1] connection accepted from 172.19.0.3:36916 #1 (1 connection now open)
- Open localhost:3000 in Browser.
WATT and mongodb images are composed together by docker-compose.yml. However, if you want to execute any command on particular image type:
docker run -it 5f142ecd12f5 bash
ImageId can be found from:
docker images
If you already did compose, for example, by invoking ./docker-run.sh you can attach to running container:
docker container attach 12cf98736487
And type 'b', container id comes from
docker container ls
It's possible to execute any command on running container:
docker container exec -i 12cf98736487 bash
- Make sure your .git folder is not huge since its size significantly increases docker image.
./docker-run.sh
- List docker images:
docker images
- Sample output:
watt_watt_container latest fa2fc69d89a1 5 days ago 3.36GB
mongo 3.4.19 056cb4b05c15 5 weeks ago 376MB
- Install the AWS CLI
- Push images to aws repositories.
- Images should be available at repositories.
- Update docker-compose-aws.yml with new docker images repositories.
- You can change default memory limits for each container in ecs-params.yml
- Install the Amazon ECS CLI
- Create Your Cluster, for example,
ecs-cli up --force --keypair id_rsa --capability-iam --size 1 --instance-type t2.large --vpc vpc-0d05d256d9261ccb5 --subnets subnet-0b31dfed2f9dddb0a --security-group sg-09d2b747ca8b77f1a --cluster-config watt-cluster-config --region us-east-2
- It is recommended to create your own Virtual Private Cloud (vpc), Subnet and Security Group unless you are just replacing current image.
- Deploy the Compose File to a Cluster, for example,
ecs-cli compose --file docker-compose-aws.yml --verbose up --create-log-groups --cluster-config watt-cluster-config --region us-east-2
- See watt-awslogs-group at CloudWatch, you can also download them by
aws logs get-log-events --log-group-name watt-awslogs-group --log-stream-name watt/watt_container/0f16fa2e-6db9-4cff-8b13-821b3c72f446 --output text --region us-east-2
- If you see 'Invalid command () was entered' please follow further steps
- Due to no support for interactive mode in compose there is a need to manually edit task definition
- Go to Task Definitions and chose your task.
- Click "Create new revision"
- In 'JSON' tab, add the following section to watt container:
"interactive": true,
"pseudoTerminal": true,
- Run task (Actions -> Run Task)
- Verify if WATT starts properly by inspecting the logs.
Refer WATT License