Commit c857dc7d by Szeberényi Imre

Bundled version added

parent 6a898e78
# CIRCLE Client # CIRCLE Client
The CIRCLE client is a simple python utility for logging into a VM running in the CIRCLE cloud. The CIRCLE client is a simple Python utility that logs into a VM on a single click
After clicking on the connect button on the CIRCLE dashboard, the utility starts running in the CIRCLE cloud.
After clicking the connect button on the CIRCLE dashboard, the utility starts
the appropriate program (remmina, putty, ssh...) with the current username and password. the appropriate program (remmina, putty, ssh...) with the current username and password.
# How to install circle client on Linux: # How to install circle client on Linux:
1. git clone -b linuxInstaller --single-branch https://git.ik.bme.hu/CIRCLE3/client.git 1. git clone -b linuxInstaller --single-branch https://git.ik.bme.hu/CIRCLE3/client.git
2. cd client 2. cd client
3. ansible-playbook setup.yaml 3. ansible-playbook setup.yaml<br>
If you don't want to install python3 use setup_bundled.yam instead
## The script installs: ## The script installs (if already not installed):
- python3 (except setup_bundled)
- sshpass
- remmina (standalone or snap version, snap is prefered) - remmina (standalone or snap version, snap is prefered)
- single python script (circle_client) to /usr/local/bin - single python script (circle_client) to /usr/local/bin
- circle_client.desktop to /usr/share/applications - circle_client.desktop to /usr/share/applications
- circle_client.png to /usr/share/icons - circle_client.png to /usr/share/icons
## Requirements: ## Prerequirements:
- python3 - git
- ansible-palybook - ansible-palybook
### Tested with: ### Tested with:
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
gather_facts: no gather_facts: no
vars: vars:
snap_installed: false snap_installed: false
APP_SRC: circle_client
BIN_DIR: /usr/local/bin BIN_DIR: /usr/local/bin
APP_DIR: /usr/share/applications APP_DIR: /usr/share/applications
ICON_DIR: /usr/share/icons ICON_DIR: /usr/share/icons
...@@ -55,15 +56,15 @@ ...@@ -55,15 +56,15 @@
when: snap_installed when: snap_installed
become: true become: true
- name: ensures "{{ BIN_DIR }}i" dir exists - name: ensures "{{ BIN_DIR }}" dir exists
file: file:
path: "{{ BIN_DIR }}" path: "{{ BIN_DIR }}"
state: directory state: directory
mode: "0755" mode: "0755"
- name: Install circle_clinet to "{{ BIN_DIR }}" - name: Install circle_client to "{{ BIN_DIR }}"
copy: copy:
src: "circle_client" src: "{{ APP_SRC }}"
dest: "{{ BIN_DIR }}/circle_client" dest: "{{ BIN_DIR }}/circle_client"
mode: "0755" mode: "0755"
owner: "root" owner: "root"
......
---
- hosts: localhost
become: no
gather_facts: no
vars:
snap_installed: false
APP_SRC: circle_client_bundled
BIN_DIR: /usr/local/bin
APP_DIR: /usr/share/applications
ICON_DIR: /usr/share/icons
tasks:
- name: Install sshpass
apt:
name: sshpass
become: true
- name: Check if snap installed
shell:
cmd: snap list
register: result
check_mode: false
changed_when: false
failed_when: false
- debug:
var: result.rc
- name: Set snap_installed
set_fact:
snap_installed: true
when: result.rc == 0
check_mode: false
- name: Report result
debug:
var: snap_installed
check_mode: false
- name: Install remmina via apt
apt:
name: remmina
state: present
when: not snap_installed
become: true
- name: Install remmina via snap
snap:
name:
- remmina
when: snap_installed
become: true
- name: ensures "{{ BIN_DIR }}" dir exists
file:
path: "{{ BIN_DIR }}"
state: directory
mode: "0755"
- name: Install circle_client to "{{ BIN_DIR }}"
copy:
src: "{{ APP_SRC }}"
dest: "{{ BIN_DIR }}/circle_client"
mode: "0755"
owner: "root"
become: true
- name: Install circle_client.destop" to "{{ APP_DIR }}"
copy:
src: "circle_client.desktop"
dest: "{{ APP_DIR }}/circle_client.desktop"
mode: "0644"
owner: "root"
become: true
notify:
- Update APP database
- name: Install circle_client.png" to "{{ ICON_DIR }}"
copy:
src: "circle_client.png"
dest: "{{ ICON_DIR }}/circle_client.png"
mode: "0644"
owner: "root"
become: true
handlers:
- name: Update APP database
command: update-desktop-database "{{ APP_DIR }}"
become: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment