... | ... | @@ -4,6 +4,8 @@ On this page, you will find general instructions on how to install a typical Occ |
|
|
|
|
|
### Windows
|
|
|
|
|
|
>**Note:** Windows is an experimental and often feature-lacking environment. Your mileage may vary.
|
|
|
|
|
|
Install Ruby from [here](https://rubyinstaller.org/downloads/), Python from [here](https://www.python.org/downloads/release/python-362/) and Git from [here](https://git-scm.com/downloads) and install them in that order. You can keep all install options as their defaults.
|
|
|
|
|
|
You should get the most up-to-date versions above, but you can also use these links directly to the downloads here:
|
... | ... | @@ -12,7 +14,8 @@ You should get the most up-to-date versions above, but you can also use these li |
|
|
* [Python](https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64.exe)
|
|
|
* [Git](https://github.com/git-for-windows/git/releases/download/v2.14.1.windows.1/Git-2.14.1-64-bit.exe)
|
|
|
|
|
|
Some of the libraries pulled in later may require the Visual C++ runtime and build tools found [here](http://landinghub.visualstudio.com/visual-cpp-build-tools) and you may want to install those now.
|
|
|
<!-- >**Note:** Some of the libraries pulled in later may require the Visual C++ runtime and build tools found [here](http://landinghub.visualstudio.com/visual-cpp-build-tools) and you may want to install those now. *If you do, you may need to restart your command prompt in order for the changes to be recognized.*
|
|
|
-->
|
|
|
|
|
|
Once you have all three installed, open a Command Prompt and then you'll be able to follow along.
|
|
|
|
... | ... | @@ -32,6 +35,8 @@ The Occam daemon is the main code that is used to store and execute objects. Thi |
|
|
|
|
|
For our typical system, we will place a daemon and then later a web-server on the same machine. We are assuming a Linux machine at the moment. We will need some other tools on the system before we can begin. Using your operating system's package manager, install git, python, and Docker.
|
|
|
|
|
|
### Grabbing the Code
|
|
|
|
|
|
Now, we will get the daemon code:
|
|
|
|
|
|
```
|
... | ... | @@ -39,3 +44,72 @@ git clone https://gitlab.com/occam-archive/occam occam |
|
|
cd occam
|
|
|
pip install -r dev-requirements.txt
|
|
|
```
|
|
|
|
|
|
After doing this, you will want to place the `occam` binary in your system's path which will allow it to be used anywhere on the system.
|
|
|
|
|
|
**Linux/OS X**:
|
|
|
```
|
|
|
export PATH=$PATH:$PWD/bin
|
|
|
```
|
|
|
|
|
|
**Windows**:
|
|
|
```
|
|
|
set PATH=%PATH%;%CD%\bin
|
|
|
```
|
|
|
|
|
|
After this, type `occam` and see if the usage appears. If you get a command not found or similar error, recheck the above steps and make sure you are in the `occam` directory. If the usage appears, continue to the next step.
|
|
|
|
|
|
### Initializing a Base System
|
|
|
|
|
|
Run the following to build the initial database:
|
|
|
|
|
|
```
|
|
|
occam system initialize
|
|
|
```
|
|
|
|
|
|
This creates a SQLite3 database and the initial configuration within the `.occam` directory in your home folder (/home/<username>/.occam or C:\Users\<username>\.occam depending on your system)
|
|
|
|
|
|
After this is done, you can create the initial account replacing <username> with your desired username below:
|
|
|
|
|
|
```
|
|
|
occam accounts new <username>
|
|
|
```
|
|
|
|
|
|
You now have a base system installed. We can move on to the web-server so we can avoid the command line and see some things in action.
|
|
|
|
|
|
## Occam Web
|
|
|
|
|
|
The web client is a web-server capable of interacting with Occam, create new objects, view interactive objects, and deploy computations.
|
|
|
|
|
|
```
|
|
|
git clone https://gitlab.com/occam-archive/occam-web-client
|
|
|
cd occam-web-client
|
|
|
```
|
|
|
|
|
|
Now we will install the dependencies of the web server. First, we need [Bundler](http://bundler.io/) which is a package management tool for ruby:
|
|
|
|
|
|
```
|
|
|
gem install bundler
|
|
|
```
|
|
|
|
|
|
From then on, we can use bundler to manage our dependencies. Right now, we will install only the dependencies we need to run.
|
|
|
|
|
|
>**Note:** We won't install the test related dependencies because they don't work on all systems at the moment. If you are developing Occam, you should remove the `--without test` if you are on a Linux or OS X machine.
|
|
|
|
|
|
```
|
|
|
bundle install --without test
|
|
|
```
|
|
|
|
|
|
Once this is done, you can start a webserver easily by typing:
|
|
|
|
|
|
```
|
|
|
puma
|
|
|
```
|
|
|
|
|
|
And in a different terminal, start an occam daemon (remember that you may need to navigate to your `occam/bin` directory or put occam in your path):
|
|
|
|
|
|
```
|
|
|
occam daemon run
|
|
|
```
|
|
|
|
|
|
When that is done, you can navigate [to your own local instance](http://localhost:9292)! |
|
|
\ No newline at end of file |