Skip to content

JeanKa25/JAMScript

 
 

Repository files navigation

Redesigning JAMScript Tools for High-Performance and Scalability

This repository is part of an ongoing effort to redesign the JAMScript tools with a focus on high-performance execution and scalable infrastructure. To achieve this, we've restructured the architecture around a client-server model that separates the responsibilities of coordination and computation.

🔧 Getting Started

1. Clone the Repository

Start by cloning the repository and switching to the appropriate branch:

git clone https://github.com/JeanKa25/JAMScript.git

Then run the install.sh to install all the dependencies:

2. Set Environment Variables

Export the following global variables:

export JAMHOME=~/JAMScript
export PATH=$JAM_HOME/tools:$PATH
export JAMDATA=~/JAMScript/data

To make these changes permanent, add them to your .bashrc:

echo 'export JAMHOME=~/JAMScript' >> ~/.bashrc
echo 'export PATH=$JAM_HOME/tools:$PATH' >> ~/.bashrc
echo 'export JAMDATA=~/JAMScript/data' >> ~/.bashrc
source ~/.bashrc

⚙️ Installing Dependencies with Ansible

You can set up your environment using Ansible with the provided playbook:

1. Install Ansible (if not already installed)

sudo apt update
sudo apt install ansible -y

2. Run the setup playbook

ansible-playbook setup_jamscript.yml -i localhost,

This playbook installs required dependencies, clones the repo, and configures environment variables as needed for JAMScript tools.


🌐 Running the Server

To start the JAMScript server, navigate to the tools directory and run the server file:

cd ~/JAMScript/tools
node app-docker.js

🔧 Path and IP Configuration

Before running the server, make sure to update the following files:

app-docker.js

  • Set the serverip parameter to the IP address of the server.

Wrapper.mjs

  • Update the following:
    • serverip: match the IP set in app-docker.js.
    • Path to JAMScript tools directory.
    • Path to your SSH authorized_keys file (used for key-based SSH access).

These updates ensure that the tools can communicate correctly and execute remote tasks securely.


🚀 Available Ansible Playbooks

Server Run Playbook

ansible-playbook serverrun-playbook.yml --extra-vars "server=server2"

JamRun Playbook

ansible-playbook jamrun-playbook.yml --extra-vars "server=server2 file=jt1.jxe app='--app=DEMO'"

JamList Playbook

ansible-playbook jamlist-playbook.yml --extra-vars "server=server2"

JamTerm Playbook (Without tmux session)

ansible-playbook jamterm-playbook.yml --extra-vars "server=server2"

JamTerm Playbook (With tmux session)

ansible-playbook jamterm-playbook.yml --extra-vars "server=server2 tmux=u-1001-dev-112-c"

JamKill Playbook

ansible-playbook jamkill-playbook.yml --extra-vars "server=server2"

Server Kill Playbook

ansible-playbook serverkill-playbook.yml --extra-vars "server=server2"

About

A programming language for cloud of moving things (edge-based IoT)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 61.9%
  • JavaScript 29.7%
  • Shell 8.2%
  • Other 0.2%