<commit_before># Web_Flask_Cassandra

# Configurasi Docker
Menggunakan private cloud dengan Docker, untuk memanipulasi topologi 
Ada 3 Container yang dibuat dari images Ubuntu.15.04

## Ambil Images Ubuntu.15.04

    sudo docker pull ubuntu:15.04

## Buat Container dengan nama cassandra-server1 sebagai node1
    sudo docker run -d -i -p 5052:22 --ulimit nofile=100000:100000 --ulimit memlock=-1:-1 --ulimit nproc=32768:32768 --name="cassandra-server1" ubuntu:15.04 /bin/bash
            
## Buat Container dengan nama cassandra-server2 sebagai node2
    sudo docker run -d -i -p 5053:23 --ulimit nofile=100000:100000 --ulimit memlock=-1:-1 --ulimit nproc=32768:32768 --name="cassandra-server2" ubuntu:15.04 /bin/bash
            
## Buat Container dengan nama cassandra-server3 sebagai node3
    sudo docker run -d -i -p 5054:24 --ulimit nofile=100000:100000 --ulimit memlock=-1:-1 --ulimit nproc=32768:32768 --name="cassandra-server3" ubuntu:15.04 /bin/bash

## Insatal Java 8 dan vim, libevent-dev pada container "node1, node2, node3"
    sudo docker exec -ti cassandra-server apt-get update
    sudo docker exec -ti cassandra-server apt-get install iputils-ping telnet bridge-utils wget curl vim
    sudo docker exec -ti cassandra-server apt-get install libevent-dev aptitude net-tools

# Install Cassandra versi 3.11
## Instal pada masing-masing container Docker:
            
     root# echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
            
     root# curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -

     root# apt-get update
            
     root# apt-get install cassandra
            
## Configurasi file /etc/cassandra/cassandra.yaml disetiap container:

            ........
            cluster_name: 'Arsip Dokument'
            ........
            # seeds is actually a comma-delimited list of addresses.
            # Ex: "<ip1>,<ip2>,<ip3>"
            - seeds: "172.17.0.2,172.17.0.3,172.17.0.4"     #ini diisi dengan alamat IP masing-masing node1, node2, node3
            ........
            listen_address: 172.17.0.2                      #Awalnya "localhost", diganti IP masing-masing node, node1(172.17.0.2), node2(172.17.0.3), node3(172.17.0.4)
            ........
            rpc_address: localhost                          #Awalnya "localhost", diganti IP masing-masing node, node1(172.17.0.2), node2(172.17.0.3), node3(172.17.0.4)

## Menjalankan Cassandra :
          
             root# service cassandra start
             
             root# service cassandra status
               * Cassandra is running
               
             root# nodetool status
             Datacenter: datacenter1<commit_msg>cassandra versi 3.8<commit_after># Web_Flask_Cassandra

# Configurasi Docker
Menggunakan private cloud dengan Docker, untuk memanipulasi topologi 
Ada 3 Container yang dibuat dari images Ubuntu.15.04

## Ambil Images Ubuntu.15.04

    sudo docker pull ubuntu:15.04

## Buat Container dengan nama cassandra-server1 sebagai node1
    sudo docker run -d -i -p 5052:22 --ulimit nofile=100000:100000 --ulimit memlock=-1:-1 --ulimit nproc=32768:32768 --name="cassandra-server1" ubuntu:15.04 /bin/bash
            
## Buat Container dengan nama cassandra-server2 sebagai node2
    sudo docker run -d -i -p 5053:23 --ulimit nofile=100000:100000 --ulimit memlock=-1:-1 --ulimit nproc=32768:32768 --name="cassandra-server2" ubuntu:15.04 /bin/bash
            
## Buat Container dengan nama cassandra-server3 sebagai node3
    sudo docker run -d -i -p 5054:24 --ulimit nofile=100000:100000 --ulimit memlock=-1:-1 --ulimit nproc=32768:32768 --name="cassandra-server3" ubuntu:15.04 /bin/bash

## Insatal Java 8 dan vim, libevent-dev pada container "node1, node2, node3"
    sudo docker exec -ti cassandra-server apt-get update
    sudo docker exec -ti cassandra-server apt-get install iputils-ping telnet bridge-utils wget curl vim
    sudo docker exec -ti cassandra-server apt-get install libevent-dev aptitude net-tools

# Install Cassandra versi 3.8
## Instal pada masing-masing container Docker:
            
     root# echo "deb http://www.apache.org/dist/cassandra/debian 38x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
            
     root# curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -

     root# apt-get update
            
     root# apt-get install cassandra
            
## Configurasi file /etc/cassandra/cassandra.yaml disetiap container:

            ........
            cluster_name: 'Arsip Dokument'
            ........
            # seeds is actually a comma-delimited list of addresses.
            # Ex: "<ip1>,<ip2>,<ip3>"
            - seeds: "172.17.0.2,172.17.0.3,172.17.0.4"     #ini diisi dengan alamat IP masing-masing node1, node2, node3
            ........
            listen_address: 172.17.0.2                      #Awalnya "localhost", diganti IP masing-masing node, node1(172.17.0.2), node2(172.17.0.3), node3(172.17.0.4)
            ........
            rpc_address: localhost                          #Awalnya "localhost", diganti IP masing-masing node, node1(172.17.0.2), node2(172.17.0.3), node3(172.17.0.4)

## Menjalankan Cassandra :
          
             root# service cassandra start
             
             root# service cassandra status
               * Cassandra is running
               
             root# nodetool status
             Datacenter: datacenter1
{'fraction_non_alphanumeric': 0.1115762650163815, 'fraction_numerical': 0.07899526756461595, 'mean_word_length': 2.236160188457008, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 20, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '997395', 'n_tokens_mistral': 2109, 'n_tokens_neox': 1753, 'n_words': 477}