[Arches] Re: Moving to the Production Server

2017-02-22 Thread Vincent Meijer
Hi Lucy,

Personally I would have somebody on-site with you who knows that she/he's 
doing before bringing anything to Production.
It is not rocket science, but you are putting your precious data online and 
without the right precautions you could be at risk of losing it.
Again, this is just my opinion. :)

However, there are some instructions available to get you started, e.g. 
here: http://arches-hip.readthedocs.io/en/latest/extra/ 
And especially 
here: 
http://arches-hip.readthedocs.io/en/latest/extra/#serving-your-arches-app-with-apache
 


Regarding getting your app to your server, there are many ways.
Often people use a code repository system like GIT, create a 'tag' (which 
is a snapshot of your code) and download it from your repository to your 
production server. 
In your case that will only be your customized app. You should to the 
installation of Arches and its dependencies like you did on the development 
server.  

Regarding your database, your option 2 sounds like what you should do. 
I assume your authority files and resource graphs are included in your 
custom app, so after installing Arches you would do something like:

python manage.py packages -o install
python manage.py packages -o load_concept_scheme -s /your-app/source_data/
concepts/authority_files


I know these directions are a little fragmentary (it's hard to explain all 
at once), but I hope this helps.

Regards,
Vincent


On Tuesday, 21 February 2017 12:38:22 UTC-5, Lucy Fletcher-Jones wrote:
>
> Although we are a long way off from transferring to the production server, 
> I would just like to ask those who are experienced in this, what the steps 
> are. We are customising Arches so have many small changes.
> Do you either:
> 1. Back up the Arches programs on the test server without resource data, 
> of course, and restore to the production server, assuming that the 
> dependencies are the same on both.
> Or 
> 2. Install Arches again on the Production server loading the modified 
> authority files and resource graphs and copy over the app customisation 
> directories?
>
> Thank you very much,
>
> Lucy
>
>

-- 
-- To post, send email to archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to archesproject+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Arches] Re: Cannot run manage.py

2017-02-22 Thread Vincent Meijer
For future generations, this is the mentioned 
post: https://groups.google.com/forum/#!topic/archesproject/5FU8icivRmo 

On Tuesday, 21 February 2017 02:04:08 UTC-5, Joel Aldor wrote:
>
> Hi Vincent, thanks for helping out! But I abandoned this part already 
> because I was able to migrate my Arches server from AWS to Azure. I posted 
> the steps on a new thread. :)
>
> On Tuesday, February 21, 2017 at 1:49:51 AM UTC+8, Vincent Meijer wrote:
>>
>> Hey Joel, could you check arches and arches_hip are installed in 
>> ~/Projects/ENV/lib/python2.7/site-packages ? 
>> Or somewhere along that path, not sure if I got it exactly right off the 
>> top of my head. 
>>
>>
>> On Saturday, 18 February 2017 01:27:58 UTC-5, Joel Aldor wrote:
>>>
>>> Hello,
>>>
>>> Tried to create a new Arches3-HIP installation, but when I go to step 2 
>>> on this link: 
>>> http://arches-hip.readthedocs.io/en/latest/getting-started/#running-arches-hip,
>>>  
>>> I get the Unknown command: 'packages' error below. I checked 'help' as 
>>> indicated below, and the packages subcommand seemed not to be included 
>>> on my django installation (Django version I have is 1.6.2). 
>>>
>>> What can be done here? Thanks for the help.
>>>
>>> (ENV2)ubuntu@PHMARCHES3DEV:~/Projects/phm2app$ python manage.py 
>>> packages -o install
>>> Unknown command: 'packages'
>>> Type 'manage.py help' for usage.
>>> (ENV2)ubuntu@PHMARCHES3DEV:~/Projects/phm2app$ python manage.py help
>>> Usage: manage.py subcommand [options] [args]
>>>
>>>
>>> Options:
>>>   -v VERBOSITY, --verbosity=VERBOSITY
>>> Verbosity level; 0=minimal output, 1=normal 
>>> output,
>>> 2=verbose output, 3=very verbose output
>>>   --settings=SETTINGS   The Python path to a settings module, e.g.
>>> "myproject.settings.main". If this isn't 
>>> provided, the
>>> DJANGO_SETTINGS_MODULE environment variable will 
>>> be
>>> used.
>>>   --pythonpath=PYTHONPATH
>>> A directory to add to the Python path, e.g.
>>> "/home/djangoprojects/myproject".
>>>   --traceback   Raise on exception
>>>   --version show program's version number and exit
>>>   -h, --helpshow this help message and exit
>>>
>>>
>>> Type 'manage.py help ' for help on a specific subcommand.
>>>
>>>
>>> Available subcommands:
>>>
>>>
>>> [django]
>>> check
>>> cleanup
>>> compilemessages
>>> createcachetable
>>> dbshell
>>> diffsettings
>>> dumpdata
>>> flush
>>> inspectdb
>>> loaddata
>>> makemessages
>>> runfcgi
>>> runserver
>>> shell
>>> sql
>>> sqlall
>>> sqlclear
>>> sqlcustom
>>> sqldropindexes
>>> sqlflush
>>> sqlindexes
>>> sqlinitialdata
>>> sqlsequencereset
>>> startapp
>>> startproject
>>> syncdb
>>> test
>>> testserver
>>> validate
>>> (ENV2)ubuntu@PHMARCHES3DEV:~/Projects/phm2app$
>>>
>>> Regards,
>>>
>>> Joel
>>>
>>

-- 
-- To post, send email to archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to archesproject+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Arches] STEPS: Arches 3 server migration from AWS to Azure

2017-02-22 Thread Vincent Meijer
Awesome, thanks for sharing

On Tuesday, 21 February 2017 02:16:35 UTC-5, Joel Aldor wrote:
>
> Hi Alexei,
>
> I've only had two months of working with Azure, but apart from the 
> interface I don't see much difference with AWS as far as administering 
> servers are concerned, and I don't think I'll encounter problems with 
> Arches running on Azure. The reason we made the migration is because we got 
> an Azure sponsorship through a software grant, so that will definitely save 
> us money. :)
>
> Regards,
>
> Joel
>
> On Tue, Feb 21, 2017 at 3:08 PM, Alexei Peters  > wrote:
>
>> Thanks for sharing Joel (and for all the hard work)!  I'm sure this will 
>> be helpful to many users.  How do you find AWS vs. Azure?
>> Cheers,
>> Alexei
>>
>>
>> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173
>>
>> On Mon, Feb 20, 2017 at 11:00 PM, Joel Aldor > > wrote:
>>
>>> Hi guys!
>>>
>>> I'm sharing to you the steps in migrating your Arches server from AWS to 
>>> Microsoft Azure. I must admit the whole migration was pretty hard, since 
>>> AWS doesn't allow you to export your Linux EC2 instances to another cloud 
>>> provider. But after weeks of trial and error, I'm finally able to migrate 
>>> it completely. :)
>>>
>>> These steps will work, assuming your Arches is installed on an Ubuntu 
>>> server running on an EC2 instance, and you're using S3 for your image and 
>>> file storage.
>>>
>>> 1.) Launch an Ubuntu 14.04 LTS virtual machine on your Azure portal. 
>>> Make sure your virtual machine has the same security group settings that 
>>> you have on your AWS EC2 instance.
>>>
>>> 2.) Log in to your Ubuntu server, then create your root password 
>>> sudo passwd root
>>>
>>> To allow remote login using root, you also need to edit the file 
>>> /etc/ssh/sshd_config, and comment out the following line:
>>> PermitRootLogin without-password 
>>>
>>> Just below it, add the following line:
>>> PermitRootLogin yes 
>>>
>>> Save the file, then restart SSH:
>>> service ssh restart
>>>
>>> 3.) Create an Azure storage account, then launch an Azure storage 
>>> container. Once you created the container, get the Azure container name and 
>>> access key, which you will use on step #5.
>>>
>>> 4.) Get your AWS Access Key ID and Secret Access Key from your AWS 
>>> Console's IAM, which you will use on step #5.
>>>
>>> 5.) Migrate your AWS S3 bucket to the new Azure storage container using 
>>> Flexify.io. Create a free account on Flexify, then launch a migration 
>>> task. I was able to migrate all my files totalling 6.5GB in just about 20 
>>> minutes.
>>>
>>> 6.) Start the server migration process from AWS EC2 to Azure using a 
>>> custom rsync shell script. Follow the pretty straightforward steps from 
>>> this link here: https://cloudnull.io/2012/07/cloud-server-migration (Go 
>>> to the section that says *Migrate using RSYNC The Easy Way *and follow 
>>> the steps there). After the migration, the new server will automatically 
>>> reboot itself.
>>>
>>> *Note: the rsync shell script uses Rackspace directory defaults, but it 
>>> worked pretty fine on me, so just hit ENTER to continue when you're 
>>> prompted to apply the default*
>>>
>>> 7.) Login to the new server, then restart Elasticsearch and Apache. By 
>>> this point, your new server is now hosting Arches, and you can already open 
>>> Arches on your browser. However it's still pointing to the old S3 bucket.
>>>
>>> 8.) Install the django-storages-redux by following the steps from here: 
>>> https://github.com/schumannd/django-storages. This is a forked 
>>> django-storages package, because the original django-storages has seen no 
>>> commit applied since March 2014, and there were errors on the AzureStorage 
>>> library.
>>>
>>> 9.) Comment out the AWS variables on settings.py and instead add these 
>>> variables:
>>>
>>> DEFAULT_FILE_STORAGE = 'storages.backends.azure_storage.AzureStorage'
>>> AZURE_ACCOUNT_NAME = ''
>>> AZURE_ACCOUNT_KEY = ''
>>> AZURE_CONTAINER = ''
>>> MEDIA_URL = '>> https://your_azure_account_name.blob.core.windows.net/your_azure_container
>>> >'
>>>
>>> 10.) Save your settings.py file, then restart your Apache server. 
>>>
>>> *And you're done! *You can now point your domain to the new Azure 
>>> virtual machine and start decommissioning your AWS resources.
>>>
>>> If there's any problem you're encountering, please let me know here and 
>>> I'd be happy to help!
>>>
>>> Special thanks to Adam Cox for helping me out on some parts of this 
>>> migration process!
>>>
>>> Regards, 
>>>
>>> Joel
>>>
>>> -- 
>>> -- To post, send email to arches...@googlegroups.com . To 
>>> unsubscribe, send email to archesprojec...@googlegroups.com 
>>> . For more information, visit 
>>> https://groups.google.com/d/forum/archesproject?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Arches Project" group.
>>> To unsubscribe from this group and stop