Commit 0592a92b authored by John Hackett's avatar John Hackett

Moved from sqlite to TiDB

parent 74ff5eb1
......@@ -79,15 +79,15 @@ PORT = 2633
LISTEN_ADDRESS = "0.0.0.0"
DB = [ BACKEND = "sqlite" ]
# DB = [ BACKEND = "sqlite" ]
# Sample configuration for MySQL
# DB = [ BACKEND = "mysql",
# SERVER = "localhost",
# PORT = 0,
# USER = "oneadmin",
# PASSWD = "oneadmin",
# DB_NAME = "opennebula" ]
DB = [ BACKEND = "mysql",
SERVER = "127.0.0.1",
PORT = "4000",
USER = "root",
PASSWD = "oneadmin",
DB_NAME = "opennebula" ]
VNC_PORTS = [
START = 5900
......@@ -145,18 +145,18 @@ VNC_PORTS = [
#
#*******************************************************************************
FEDERATION = [
MODE = "MASTER",
ZONE_ID = 0,
]
#FEDERATION = [
# MODE = "MASTER",
# ZONE_ID = 0,
#]
RAFT = [
LOG_RETENTION = 500000,
LOG_PURGE_TIMEOUT = 600,
ELECTION_TIMEOUT_MS = 2500,
BROADCAST_TIMEOUT_MS = 500,
XMLRPC_TIMEOUT_MS = 2000
]
#RAFT = [
# LOG_RETENTION = 500000,
# LOG_PURGE_TIMEOUT = 600,
# ELECTION_TIMEOUT_MS = 2500,
# BROADCAST_TIMEOUT_MS = 500,
# XMLRPC_TIMEOUT_MS = 2000
#]
# Executed when a server transits from follower->leader
# RAFT_LEADER_HOOK = [
......
......@@ -29,6 +29,14 @@
- acl
- tcpdump
- openvswitch-switch
- apt-transport-https
- ca-certificates
- curl
- gnupg2
- software-properties-common
- python-docker
- python-mysqldb
- mysql-client
# - name: create bridge
# openvswitch_bridge:
# bridge: onebr0
......@@ -56,6 +64,43 @@
# path: /tmp/foobar
# state: touch
# delegate_to: "one"
- name: install oned config
copy:
src: ./files/oned.conf/master
dest: /etc/one/oned.conf
- name: install docker key
apt_key: url=https://download.docker.com/linux/debian/gpg state=present
- name: install docker repo
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable"
state: present
- name: install docker
apt:
name: docker-ce
state: installed
update_cache: yes
- name: pull tidb image
docker_image:
name: pingcap/tidb:latest
- name: start TiDB
docker_container:
name: opennebula
image: pingcap/tidb:latest
state: started
# recreate: yes
exposed_ports:
- 4000
published_ports:
- 4000:4000
# - mysql_user:
# name: "root"
# password: "oneadmin"
# login_host: 127.0.0.1
# login_port: 4000
# update_password: always
# state: present
- name: set mysql password
shell: mysql -h 127.0.0.1 -P 4000 -u root --password= -e "SET PASSWORD FOR root = 'oneadmin';FLUSH PRIVILEGES;" || true
- name: start services
systemd:
state: started
......
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 to comment